Queue: A queue is a container of objects that are inserted and removed according to first-in-first-out(FIFO) principle.
[Problem]
Enqueue the given N (2 <=N <=100) numbers in order into a queue, then dequeue each and print on the screen.
[Input]
The first input line contains the number of test cases,T.
The next line contains the number of data input.
Then,integer data will be listed.
[Output]
For each given test case,print each queue.
Input OUTPUT
2 //Test case #1 1 2 3 4 5
5 //Data size #2 5 4 3 2 1
1 2 3 4 5
5
5 4 3 2 1
[Problem]
Enqueue the given N (2 <=N <=100) numbers in order into a queue, then dequeue each and print on the screen.
[Input]
The first input line contains the number of test cases,T.
The next line contains the number of data input.
Then,integer data will be listed.
[Output]
For each given test case,print each queue.
Input OUTPUT
2 //Test case #1 1 2 3 4 5
5 //Data size #2 5 4 3 2 1
1 2 3 4 5
5
5 4 3 2 1