175. Queue Operations
Simulate a queue — values leave in the order they arrived.
Whatever you push first is whatever comes out first. That single rule is the whole difference from a stack, and every problem in this topic rests on it.
If a dequeue or a front happens while the queue is empty, print Empty and carry on
rather than stopping.
Constraints - `1 ≤ q ≤ 200000` - `-1000000 ≤ x ≤ 1000000`
Input
The first line contains an integer q, the number of operations.
Each of the next q lines is one operation:
- 1 x — add x to the back of the queue
- 2 — remove the front value and print it
- 3 — print the front value without removing it
Output
Print one line for each 2 and 3 operation — the value, or Empty.
A 1 operation prints nothing. If there are no 2 or 3 operations, print nothing at all.