Sam is a kindergartener, and there are $n$ children in his group. He decided to create a team with some of his children to play "brawl:go 2".

Sam has $n$ power-ups, the $i$-th has type $a_i$. A child's strength is equal to the number of different types among power-ups he has.

For a team of size $k$, Sam will distribute all $n$ power-ups to $k$ children in such a way that each of the $k$ children receives at least one power-up, and each power-up is given to someone.

For each integer $k$ from $1$ to $n$, find the minimum sum of strengths of a team of $k$ children Sam can get.


-----Input-----

Each test contains multiple test cases. The first line contains a single integer $t$ ($1 \le t \le 3 \cdot 10^5$) — the number of test cases. Description of the test cases follows.

The first line of each test case contains a single integer $n$ ($1 \le n \le 3 \cdot 10^5$).

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \le a_i \le 10^9$) — types of Sam's power-ups.

It is guaranteed that the sum of $n$ over all test cases does not exceed $3 \cdot 10^5$.


-----Output-----

For every test case print $n$ integers.

The $k$-th integer should be equal to the minimum sum of strengths of children in the team of size $k$ that Sam can get.


-----Examples-----

Input
2
3
1 1 2
6
5 1 2 2 2 4
Output
2 2 3 
4 4 4 4 5 6


-----Note-----

One of the ways to give power-ups to minimise the sum of strengths in the first test case:

$k = 1: \{1, 1, 2\}$

$k = 2: \{1, 1\}, \{2\}$

$k = 3: \{1\}, \{1\}, \{2\}$

One of the ways to give power-ups to minimise the sum of strengths in the second test case:

$k = 1: \{1, 2, 2, 2, 4, 5\}$

$k = 2: \{2, 2, 2, 4, 5\}, \{1\}$

$k = 3: \{2, 2, 2, 5\}, \{1\}, \{4\}$

$k = 4: \{2, 2, 2\}, \{1\}, \{4\}, \{5\}$

$k = 5: \{2, 2\}, \{1\}, \{2\}, \{4\}, \{5\}$

$k = 6: \{1\}, \{2\}, \{2\}, \{2\}, \{4\}, \{5\}$

Difficulty: EASY

Solutions:
def power_walking(np: int, n: int) -> str:
	s = (str(np) + ' ') * np
	for i in range(np + 1, n + 1):
		s += str(i) + ' '
	return s
test_number = int(input())
res = []
for _ in range(test_number):
	n = int(input())
	power_ups = set((int(x) for x in input().split()))
	np = len(power_ups)
	res.append(power_walking(np, n))
for r in res:
	print(r)


import sys

def solver(n, uniques):
	for i in range(1, n + 1):
		if i > uniques:
			print(i, end=' ')
		else:
			print(uniques, end=' ')
	print()
input = sys.stdin.readline
tests = int(input())
while tests:
	n = int(input())
	types = set(map(int, input().split()))
	solver(n, len(types))
	tests -= 1


t = int(input())
ll = []
for i in range(t):
	pl = []
	n = int(input())
	l = input().split()
	total = len(l)
	l = list(dict.fromkeys(l))
	nodupe = len(l)
	for j in range(nodupe):
		pl.append(nodupe)
	while nodupe < total:
		nodupe += 1
		pl.append(nodupe)
	x = ''
	for j in pl:
		x += str(j)
		x += ' '
	ll.append(x)
for i in ll:
	print(i)


t = int(input())
n_list = []
unique_powerup_list = []
for i1 in range(t):
	temp_array = []
	n = int(input())
	n_list.append(n)
	in1 = input().split()
	unique_powerup_list.append(len(set(in1)))
for i2 in range(t):
	unique_powerup = unique_powerup_list[i2]
	n = n_list[i2]
	for k in range(1, n + 1):
		if k > unique_powerup:
			print(k, end=' ')
		else:
			print(unique_powerup, end=' ')
	print()


import sys
import bisect
inp = sys.stdin.readline

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)
for _ in range(int(inp())):
	n = int(inp())
	a = {int(i) for i in inp().split()}
	for i in range(1, n + 1):
		print(max(i, len(a)), end=' ')
	print()


def count_num_type(string_tp):
	a = string_tp.split(' ')
	dic = dict()
	for i in a:
		if i in dic:
			dic[i] = dic[i] + 1
		else:
			dic[i] = 1
	return len(dic)

def print_string(vol, numtypes):
	o_str = (str(numtypes) + ' ') * numtypes
	for i in range(vol - numtypes):
		o_str = o_str + '{} '.format(numtypes + (i + 1))
	print(o_str[:len(o_str)])
test_cases = int(input())
for i in range(test_cases):
	n = int(input())
	types = input()
	numoftype = count_num_type(types)
	print_string(n, numoftype)


def count_num_type(string_tp):
	a = string_tp.split(' ')
	dic = dict()
	for i in a:
		if i in dic:
			dic[i] = dic[i] + 1
		else:
			dic[i] = 1
	return len(dic)
test_cases = int(input())
lis = list()
for i in range(test_cases):
	n = int(input())
	types = input()
	numoftype = count_num_type(types)
	a = (str(numoftype) + ' ') * numoftype
	for i in range(n - numoftype):
		a = a + '{} '.format(numoftype + (i + 1))
	print(a[:len(a)])


n = int(input())
l = []
for i in range(n):
	x = input()
	l.append(list(map(int, input().split())))

def fun1(l1):
	x = len(set(l1))
	for i in range(1, len(l1) + 1):
		if i <= x:
			print(x, end=' ')
		else:
			print(x + (i - x), end=' ')
	print()
for l1 in l:
	fun1(l1)


import sys
from sys import stdin, stdout
from math import ceil, floor, sqrt, log, log2, log10
from collections import Counter
int_max = float('inf')
int_min = -float('inf')
mod = 10 ** 9 + 7
ANS = []
input = stdin.readline

def solve():
	pass
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	dict = {}
	for i in range(n):
		if arr[i] not in dict:
			dict[arr[i]] = 1
		else:
			dict[arr[i]] += 1
	x = len(dict)
	for i in range(x):
		print(x, end=' ')
	curr = x + 1
	for i in range(x + 1, n + 1):
		print(curr, end=' ')
		curr += 1
	print()


for i in range(int(input())):
	n = int(input())
	a = input().split()
	l = len(set(a))
	s = ''
	for i in range(l):
		s += str(l) + ' '
	for i in range(n - l):
		l += 1
		s += str(l) + ' '
	print(s)


import sys, collections
input = sys.stdin.readline
arr = int(input())
res = []
for _ in range(arr):
	n = int(input())
	massiv = list(map(int, input().split()))
	obj = collections.defaultdict(lambda : 0)
	count = 0
	for x in massiv:
		if obj[x] == 0:
			count += 1
		obj[x] += 1
	for i in range(1, n + 1):
		if i <= count:
			print(count, end=' ')
		else:
			count += 1
			print(count, end=' ')
	print()


import sys, collections
input = sys.stdin.readline
tcs = int(input())
res = []
for _ in range(tcs):
	n = int(input())
	arr = list(map(int, input().split()))
	hp = collections.defaultdict(lambda : 0)
	sz = 0
	for x in arr:
		if hp[x] == 0:
			sz += 1
		hp[x] += 1
	for i in range(1, n + 1):
		if i <= sz:
			print(sz, end=' ')
		else:
			sz += 1
			print(sz, end=' ')
	print()


import sys
import heapq
from collections import defaultdict
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
tests = inp()
for j in range(tests):
	total = inp()
	powers = inlt()
	group = defaultdict(int)
	for i in powers:
		group[i] += 1
	min_ = len(group)
	ans = []
	for x in range(1, total + 1):
		if x <= min_:
			ans.append(min_)
			print(min_, end=' ')
		else:
			print(ans[-1] + 1, end=' ')
			ans.append(ans[-1] + 1)
	print('')


for i in range(int(input())):
	lenn = int(input())
	powers = list(map(int, input().split()))
	new = sorted(powers)
	diff = 0
	for i in range(lenn - 1):
		if new[i] == new[i + 1]:
			diff += 1
	diff = lenn - diff
	output = (str(diff) + ' ') * diff
	for i in range(diff + 1, lenn + 1):
		output += str(i) + ' '
	print(output)


def strengths(powerups):
	output = ''
	n = len(powerups)
	powerups = set(powerups)
	for i in range(1, n + 1):
		if i > len(powerups):
			output += str(i)
			output += ' '
		else:
			output += str(len(powerups))
			output += ' '
	print(output)
cases = int(input())
for _ in range(cases):
	n = int(input())
	powerups = []
	powerups = list(map(int, input().split()))
	strengths(powerups)


for _ in range(int(input())):
	n = int(input())
	l = len(set(map(int, input().split())))
	p = ''
	for i in range(n):
		p += str(max(i + 1, l))
		p += ' '
	print(p)


from collections import Counter
k = int(input())
li = []
for i in range(k):
	input()
	li += [[int(b) for b in input().split()]]
l = []
for i in range(k):
	o = len(Counter(li[i]))
	u = [o for f in range(len(li[i]))]
	for h in range(o, len(li[i])):
		u[h] = u[h - 1] + 1
	l += [u]
for i in range(k):
	for g in l[i]:
		print(g, end=' ')
	print()


t = int(input())
while t > 0:
	n = int(input())
	x = list(map(int, input().split()))
	length = len(set(x))
	ans = ''
	for k in range(1, n + 1):
		ans += str(max(k, length)) + ' '
	print(ans)
	t -= 1


from collections import Counter
t = int(input())
for r in range(t):
	n = int(input())
	lst = input().split()
	var = len(set(lst))
	for k in range(1, n + 1):
		if k <= var:
			print(var, end=' ')
		else:
			print(k, end=' ')
	print()


import sys
import math
ttime = int(input())
for ccount in range(ttime):
	n = int(input())
	a = list(map(int, input().split()))
	cnt = len(set(a))
	for i in range(1, n + 1):
		sys.stdout.write(str(max(i, cnt)) + ' ')
	print()


for _ in range(int(input())):
	n = int(input())
	x = [int(i) for i in input().split()]
	s = set(x)
	k = len(s)
	for i in range(1, n + 1):
		if i <= k:
			print(k, end=' ')
		else:
			print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	size = len(set(arr))
	for i in range(1, n + 1):
		if i <= size:
			print(size, end=' ')
		else:
			print(i, end=' ')
	print('\r')