The correct option is A in
A 'queue' is a line or sequence of people waiting for their turn for something.
Option A: 'In' means 'a situation where one appears to be enclosed or surrounded by something' or 'in the middle of'. This word relates to the given sentence, as the students were within the queue, an imaginary line. Hence option A is correct.
Option B: 'On' refers to the top or surface of something. This meaning does not apply here, as a queue is abstract.
Option C: 'At' also refers to a place, but it generally refers to buildings, organizations or other smaller places. The noun 'queue' isn't a specific place, but a formation.
Option D: 'With' means 'to be accompanied by'. For e.g. 'I'm standing with him in the queue.' This word, too, does not apply here.
Hence options B, C and D are incorrect.