You are given a queue of 'N' elements. Your task is to reverse the order of elements present in the queue.
You can only use the standard operations of the QUEUE STL.
1. enqueue(x): Add an item x to the rear of the queue.
2. dequeue(): Removes an item from the front of the queue.
3. size(): Returns the number of elements in the queue.
4. front(): Finds front element.
5. empty(): Checks whether the queue is empty or not.
Input format:
The very first line of input contains an integer ‘T’ denoting the number of test cases.
The first line of every test case contains an integer ‘N’ denoting the number of elements present in the queue.
The second line of every test case contains ‘N’ space-separated integers denoting the elements present in the queue.
Output format:
For each test case, print space-separated integers denoting the elements in the queue in the reverse order.
Print the output of each test case in a separate line.
Note:
You do not need to print anything, it has already been taken care of. Just implement the given function.
Constraints:
1 <= T <= 100
1 <= N <= 3000
-10 ^ 5 <= Queue[i] <= 10 ^ 5
Time Limit: 1 sec