description: Dmitry has an array of n non-negative integers a_1, a_2, ..., a_n.
  
  In one operation, Dmitry can choose any index j (1 ≤ j ≤ n) and increase the value of the element a_j by 1. He can choose the same index j multiple times.
  
  For each i from 0 to n, determine whether Dmitry can make the MEX of the array equal to exactly i. If it is possible, then determine the minimum number of operations to do it.
  
  The MEX of the array is equal to the minimum non-negative integer that is not in the array. For example, the MEX of the array [3, 1, 0] is equal to 2, and the array [3, 3, 1, 4] is equal to 0.
  
  Input
  
  The first line of input data contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases in the input. 
  
  The descriptions of the test cases follow.
  
  The first line of the description of each test case contains a single integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the length of the array a.
  
  The second line of the description of each test case contains n integers a_1, a_2, ..., a_n (0 ≤ a_i ≤ n) — elements of the array a.
  
  It is guaranteed that the sum of the values n over all test cases in the test does not exceed 2⋅10^5.
  
  Output
  
  For each test case, output n + 1 integer — i-th number is equal to the minimum number of operations for which you can make the array MEX equal to i (0 ≤ i ≤ n), or -1 if this cannot be done.
  
  Example
  
  Input
  
  
  5
  3
  0 1 3
  7
  0 1 2 3 4 3 2
  4
  3 0 0 0
  7
  4 6 2 3 5 0 5
  5
  4 0 1 0 4
  
  
  Output
  
  
  1 1 0 -1 
  1 1 2 2 1 0 2 6 
  3 0 1 4 3 
  1 0 -1 -1 -1 -1 -1 -1 
  2 1 0 2 -1 -1 
  
  Note
  
  In the first set of example inputs, n=3:
  
    * to get MEX=0, it is enough to perform one increment: a_1++; 
    * to get MEX=1, it is enough to perform one increment: a_2++; 
    * MEX=2 for a given array, so there is no need to perform increments; 
    * it is impossible to get MEX=3 by performing increments. 
solution: import java.util.StringTokenizer;
  import java.io.InputStreamReader;
  import java.io.OutputStreamWriter;
  import java.lang.reflect.Array;
  import java.io.IOException;
  import java.io.BufferedReader;
  import java.io.BufferedWriter;
  import java.math.BigInteger;
  import java.util.Arrays;
  import java.util.Collections;
  import java.util.ArrayList;
  
  public class p4
  {
  	BufferedReader br;
  	StringTokenizer st;
  	BufferedWriter bw;
  	public static void main(String[] args)throws Exception
  	{
  		new p4().run();
  	}
  
  	void run()throws IOException
  	{
  		br = new BufferedReader(new InputStreamReader(System.in));
  		bw=new BufferedWriter(new OutputStreamWriter(System.out));
  
  		solve();
  	}
  	void solve() throws IOException
  	{
  		short t=ns();
  		while(t-->0)
  		{
  			int n=ni();
  			int a[]=nai(n);
  
  			int occ[]=new int[n+1];
  			for(int i=-1;++i<n;)
  				occ[a[i]]++;
  
  			int sum[]=new int[n+1];
  			sum[0]=occ[0];
  			for(int i=0;++i<n+1;)
  				sum[i]=sum[i-1]+occ[i];
  
  			long ans=0;
  			int i=0;
  
  			stack s=new stack();
  
  			System.out.print(sum[0]+" ");
  			for(int j=-1;++j<occ[i]-1;)
  				s.add(i);
  			for(;++i<n+1;)
  			{
  				if(sum[i-1]<i)
  					break;
  
  				int p=occ[i];
  				if(occ[i-1]==0)
  				{
  					int x=s.remove();
  					if(x==-1)
  						break;
  					ans+=i-1-x;
  				}
  
  				for(int j=-1;++j<occ[i]-1;)
  					s.add(i);
  				System.out.print((ans+(long)p)+" ");
  			}
  
  			for(i--;++i<n+1;)
  				System.out.print("-1 ");
  			
  			System.out.println();
  		}
  	}
  
  	public static class stack
  	{
  		public static class node
  		{
  			node next;
  			int val;
  			public node(int val)
  			{
  				this.val=val;
  			}
  		}
  
  		node head;
  
  		public void add(int val)
  		{
  			node a=new node(val);
  
  			a.next=head;
  			head=a;
  		}
  		public int remove()
  		{
  			if(head==null)
  				return -1;
  
  			int a=head.val;
  			head=head.next;
  			return a;
  		}
  	}
  
  
  
  
  
  
  	public int gcd(int a, int b)
  	{
  		if(a==0)
  			return b;
  		else
  		 return gcd(b%a,a);
  	}
  
  	int[] nai(int n) { int a[]=new int[n]; for(int i=-1;++i<n;)a[i]=ni();	return a;}
  
  	long[] nal(int n) { long a[]=new long[n]; for(int i=-1;++i<n;)a[i]=nl();	return a;}
  
  	char[] nac()	{char c[]=nextLine().toCharArray();	return c;}
  
  	char [][] nmc(int n)	{char c[][]=new char[n][]; for(int i=-1;++i<n;)c[i]=nac();	return c;}
  
  	int[][] nmi(int r, int c)	{int a[][]=new int[r][c]; for(int i=-1;++i<r;)a[i]=nai(c);	return a;}
  
  	String next()
  	{
  			while (st == null || !st.hasMoreElements()) {
  					try {
  							st = new StringTokenizer(br.readLine());
  					}
  					catch (IOException e) {
  							e.printStackTrace();
  					}
  			}
  			return st.nextToken();
  	}
  
  	int ni() { return Integer.parseInt(next()); }
  
  	byte nb() { return Byte.parseByte(next()); }
  
  	short ns() { return Short.parseShort(next()); }
  
  	long nl() { return Long.parseLong(next()); }
  
  	double nd()	{	return Double.parseDouble(next());	}
  
  	String nextLine()
  	{
  			String str = "";
  			try {
  					str = br.readLine();
  			}
  			catch (IOException e) {
  					e.printStackTrace();
  			}
  			return str;
  	}
  
  	int countDigits(int l)	{
  		if (l >= 1000000000) return 10;
  		if (l >= 100000000) return 9;
  		if (l >= 10000000) return 8;
  		if (l >= 1000000) return 7;
  		if (l >= 100000) return 6;
  		if (l >= 10000) return 5;
  		if (l >= 1000) return 4;
  		if (l >= 100) return 3;
  		if (l >= 10) return 2;
  		return 1;
  	}
  	int countDigits(long l) {
  		if (l >= 1000000000000000000L) return 19;
  		if (l >= 100000000000000000L) return 18;
  		if (l >= 10000000000000000L) return 17;
  		if (l >= 1000000000000000L) return 16;
  		if (l >= 100000000000000L) return 15;
  		if (l >= 10000000000000L) return 14;
  		if (l >= 1000000000000L) return 13;
  		if (l >= 100000000000L) return 12;
  		if (l >= 10000000000L) return 11;
  		if (l >= 1000000000L) return 10;
  		if (l >= 100000000L) return 9;
  		if (l >= 10000000L) return 8;
  		if (l >= 1000000L) return 7;
  		if (l >= 100000L) return 6;
  		if (l >= 10000L) return 5;
  		if (l >= 1000L) return 4;
  		if (l >= 100L) return 3;
  		if (l >= 10L) return 2;
  		return 1;
  	}
  }