First in, first out (FIFO) is the default (oldest shares are sold first).
Last in, first out (LIFO) is the opposite. You sell your newest shares first.
If you use any method other than FIFO, you must tell your broker which shares you want sold. According to IRS Publication 550, the burden is on you to prove that you instructed your broker which shares to sell and that your broker followed your requests. If you can't prove that, you're treated as having sold your oldest shares first (FIFO).
If the shares purchased in January of 2018 were bought more than 30 days before the March sale then there is no wash sale. If that's the case then you could have designated that shares from the first purchase were sold (a loss) or shares from the second purchase were sold (a gain).