Doraemon gave Nobita a gadget that swaps words inside a string in the following manner :

If there are W words, word 1 is swapped with word W, word 2 is swapped with word W-1 and so on.
The problem is that Nobita himself cannot verify the answer for large strings. Help him write a program to do so.

INPUT : 
the first line of the input contains the number of test cases. Each test case consists of a single line containing the string.

OUTPUT :
output the string with the words swapped as stated above.

CONSTRAINTS :
|string length| ≤ 100000
string contains english alphabets and spaces

SAMPLE INPUT
1
hello world

SAMPLE OUTPUT
world hello
import sys
s=input()
for i in range(0,s):
	c=raw_input()
	C=c.split()
	A=[]
	for j in range(0,len(C)):
		A.append(C[j])
	
	m=0;
	n=len(A)-1;
	while(m<n):
		l=A[m]
		A[m]=A[n]
		A[n]=l
		m=m+1
		n=n-1
	for i in A:
		sys.stdout.write(i)
		sys.stdout.write(" ")
	print