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:
'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
print 'Hello World!'
'''

import collections
t=int(raw_input())
assert t>=1 and t<=100
for i in range(0,t):
	n=int(raw_input())
	assert n>=1 and n<=100000
	l=raw_input().split()
	d=collections.Counter()
	for x in l:
		d[int(x)]+=1
	l=reversed(sorted(d))
	for r,s in d.most_common(1):
		x=s
	for s in l:
		if d[s]==x:
			print s,
	print