Problem: Write a program to find the mode of a given list of integers. Mode of a number is defined as the number which is most frequently occured. 
For example: 
L = {1,2,2,3} // Here mode is 2(most frequently occured)  

It is possible that multiple answers are possible for a list. In that case print all possible answers in non-increasing order.

Input:
First Line of input contains an integer t represeting the number of test cases, Where first line of each test case has an integers N - number of integers in list, Next line contains N integers.

Output:
print all the possible modes in non-increasing order.

Constraints:
1 ≤ t ≤ 100
1 ≤ N<100000
1 ≤ a[i] ≤ 1000000

SAMPLE INPUT
2
5
1 2 2 2 2 
6
1 2 2 3 3 4

SAMPLE OUTPUT
2 
3 2

Solution (in PYTHON):

Solution:
tc=input()
lr=[]
while tc>0:
	num=input()
	st=raw_input()
	ll=st.split()
	ln=[]
	d={}
	for i in ll:
		ln.append(int(i))
	for i in ln:
		if d.has_key(i)==True:
			d[i]=d[i]+1
		else:
			d.setdefault(i,1)
	ld=d.values()
	val=max(ld)
	lans=[]
	for i in d.keys():
		if d[i]==val:
		   lans.append(i)
	for i in range(0,len(lans)):
		for j in range(i+1,len(lans)):
			if lans[i] <lans[j]:
				lans[i],lans[j]=lans[j],lans[i]
	lr.append(lans)	
	tc=tc-1
for i in lr:
	for j in i:
		print j,
	print ""