A parcel relay behaves as a first-in first-out queue. Starting empty, it processes q operations, each one of:
ENQ x— append the integerxto the back of the queue.DEQ— remove the element at the front and report it. It is guaranteed the queue is non-empty.PEEK— report the element currently at the front, without removing it. It is guaranteed the queue is non-empty.
Input format
Line 1: an integer q.
Next q lines: one operation each.
Output format
For every DEQ and every PEEK operation, in order, print the reported element on its own line.
Constraints
- 1 <= q <= 40
- -1000000 <= x <= 1000000
- Every
DEQandPEEKacts on a non-empty queue.