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:
total_test_cases = int(raw_input())
for case in xrange(total_test_cases):
	n = int(raw_input())
	numbers = raw_input().split()
	num_dict={}
	for num in numbers:
		num = int(num)
		if num in num_dict:
			num_dict[num]+=1
		else:
			num_dict[num]=1
	mode_numbers=[]
	max_freq = 0
	for key in num_dict.keys():
		if num_dict[key] > max_freq:
			mode_numbers=[key]
			max_freq = num_dict[key]
		elif num_dict[key] == max_freq:
			mode_numbers.append(key)
	mode_numbers.sort()
	for num in mode_numbers[::-1]:
		print num,
	print ""