Skylar is learning Queues. So she gives you an empty queue initially and some operations on this queue.
The operations contains:
1. E x Enqueue x
2. D Dequeue
3. A Print the head of the queue.
Finally, You should output all the elements in the queue after all operations.
There is only one test case. The first line is integer \(n (1 \leq n \leq 20000000) \), the number of operations. Then \(n\) lines for these operations, \(x\) in int range.
Do each operation, if it is type 'A', print current queue head in one line. After doing all operations, output the final queue elements in one line, if the queue is empty, print nothing. It is guaranteed that all operations are legal.