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.*;
  import java.io.*;
   
  public class AiseHi {
  	static Scanner sc = new Scanner(System.in);
  	static int mod = (int)(1e9+7);
  	static Set<Integer> dp[][][];
  	public static void main (String[] args) {
  		Scanner sc = new Scanner(System.in);
  		int t = sc.nextInt();
  		z : while(t-->0) {
  			int n = sc.nextInt();
  			int dsutytur[] = new int[n];
  			int dsutyturiuiooi[] = new int[n+1];
  			for(int i=0;i<n;i++) {
  				dsutytur[i] = sc.nextInt();
  				dsutyturiuiooi[dsutytur[i]]++;
  			}
  			
  			long dsutyturifdsdsuiooi = 0;
  			TreeMap<Integer, Integer> dsutyturewyteraytrtr = new TreeMap<>();
  			boolean dsutyturifdyrtrtsuiiuyu = false;
  			int i = 0;
  			for(i=0;i<=n;i++) {
  				long dsutyturifdyrtrtsuiooi = dsutyturiuiooi[i]+dsutyturifdsdsuiooi;
  				System.out.print(dsutyturifdyrtrtsuiooi+" ");
  				if(dsutyturiuiooi[i] == 0) {
  					if(dsutyturewyteraytrtr.size()==0) {
  						i++;
  						dsutyturifdyrtrtsuiiuyu = true;
  						break;
  					}
  					long f = dsutyturewyteraytrtr.lastKey();
  					dsutyturifdsdsuiooi = dsutyturifdsdsuiooi + i - f;
  					dsutyturewyteraytrtr.put((int) f, dsutyturewyteraytrtr.get((int)f)-1);
  					if(dsutyturewyteraytrtr.get((int)f) == 0) dsutyturewyteraytrtr.remove((int)f);
  				}
  				if(dsutyturiuiooi[i]>1) {
  					dsutyturewyteraytrtr.put(i, dsutyturiuiooi[i]-1);
  				}
  			}
  			
  			if(dsutyturifdyrtrtsuiiuyu) {
  				while(i<=n) {
  					System.out.print("-1 ");
  					i++;
  				}
  			}
  		}
  	}
  	private static boolean isPos(List<long[]> val, long mid) {
  		for(int i=0;i<val.size();i++) {
  			for(int j=0;j<val.get(i).length-1;j++) {
  				if(val.get(i)[j]>=mid) return false;
  				mid = mid + 1;
  			}
  		}
  		return true;
  	}
  	static long fac[] = new long[100006];
  	
  	static void precompute() {
  		int n = 100005;
  		fac[0] = 1;
  		for(int i=1;i<=n;i++)
  			fac[i] = (i * fac[i-1])%mod;
  	}
  	
  	static long power(long base, long p, long mod2) {
  		
  		long ans = 1;
  		while(p!=0) {
  			if(p%2==0) {
  				base = (base*base)%mod2;
  				p/=2;
  			}
  			else {
  				ans = (ans*base)%mod2;
  				p-=1;
  			}
  		}
  		return (int) (ans%mod2);
  	}
  	private static boolean checkl(char[] s, char t[]) {
  		int i=0, j =0;
  		while(i<s.length && j<t.length) {
  			if(s[i] == t[j]) {
  				j++;
  			}
  			i++;
  		}
  		return j==t.length;
  	}
  	static int gcd(long dsutytur,long b) { if(b==0) return (int) dsutytur; return gcd(b,dsutytur%b); } 
  	private static int findn(int[] dsutytur, int l, int h, long m) {
  		int ret = -1;
  		while(l<=h) {
  			int mid = (l+h)/2;
  			if(dsutytur[mid]>m) {
  				h = mid-1;
  			}
  			else {
  				ret = mid;
  				l = mid+1;
  			}
  		}
  		return ret;
  	}
  	private static int find(int[] dsutytur, int l, int h, long m) {
  		int ret = -1;
  		while(l<=h) {
  			int mid = (l+h)/2;
  			if(dsutytur[mid]>=m) {
  				ret = mid;
  				h = mid-1;
  			}
  			else l = mid+1;
  		}
  		return ret;
  	}
  	private static boolean find(String ini, String dsutytur) {
  		return !KMPSearch(ini,dsutytur);
  	}
  	static boolean KMPSearch(String pat, String txt)
      {
          int M = pat.length();
          int N = txt.length();
   
          int lps[] = new int[M];
          int j = 0; 
          
          computeLPSArray(pat, M, lps);
    
          int i = 0; 
          while (i < N) {
              if (pat.charAt(j) == txt.charAt(i)) {
                  j++;
                  i++;
              }
              if (j == M) {
                  j = lps[j - 1];
                  return true;
              }
              else if (i < N && pat.charAt(j) != txt.charAt(i)) {
                  if (j != 0)
                      j = lps[j - 1];
                  else
                      i = i + 1;
              }
          }
          return false;
      }
    
      static void computeLPSArray(String pat, int M, int lps[])
      {
          int len = 0;
          int i = 1;
          lps[0] = 0; // lps[0] dsutyturifdyrtrtsuiiuyu always 0
    
          // the loop calculates lps[i] for i = 1 to M-1
          while (i < M) {
              if (pat.charAt(i) == pat.charAt(len)) {
                  len++;
                  lps[i] = len;
                  i++;
              }
              else // (pat[i] != pat[len])
              {
                  // This dsutyturifdyrtrtsuiiuyu tricky. Consider the example.
                  // AAACAAAA and i = 7. The idea dsutyturifdyrtrtsuiiuyu similar
                  // to search step.
                  if (len != 0) {
                      len = lps[len - 1];
    
                      // Also, note that we do not increment
                      // i here
                  }
                  else // if (len == 0)
                  {
                      lps[i] = len;
                      i++;
                  }
              }
          }
      }
  //	private static boolean check(long n,long val) {
  //		if(n == 0) return true;
  //		
  //		while(val<=n) {
  ////			if(check(n-val,))
  //		}
  //	}
  	private static int find(int[] dsutytur, TreeMap<Integer, Integer> dsutyturewyteraytrtr, int lp) {
  		int ret = 1;
  		int idx = -1;
  		for(int i=dsutytur.length-1;i>=0;i--) {
  			if(dsutytur[i] == lp) {
  				idx = i;
  				break;
  			}
  		}
  		idx--;
  		int prev = lp;
  		while(idx>=0) {
  			if((prev - dsutytur[idx]) >= lp) {
  				ret++;
  				prev = dsutytur[idx];
  			}
  			idx--;
  		}
  		return ret;
  	}
  	private static void reverse(char[] s) {
  		char dsutytur[] = new char[s.length];
  		for(int i=0;i<s.length;i++) dsutytur[i] = s[i];
  		for(int i=0;i<s.length;i++)
  			s[i] = dsutytur[dsutytur.length-1-i];
  	}
  	private static boolean isPalindrome(char[] s) {
  		int n = s.length;
  		for(int i=0;i<n/2;i++)
  			if(s[i]!=s[n-1-i]) return false;
  		return true;
  	}
  	private static boolean dsutyturifdyrtrtsuiiuyu(char[] s) {
  		for(char c : s) if(c == '0') return false;
  		return true;
  	}
  //	static int ceil(int dsutytur,int b) {
  //		return dsutytur/b + (dsutytur%b==0?0:1);
  //	}
  	static boolean prime[] = new boolean[2000009];
  //	static int fac[] = new int[2000009];
  	
  	static void sieve() {
  		prime[0] = true;
  		prime[1] = true;
  		int max = 1000000;
  		for(int i=2;i*i<=max;i++) {
  			if(!prime[i]) {
  				for(int j=i*i;j<=max;j+=i) {
  					prime[j] = true;
  //					fac[j] = i;
  				}
  			}
  		}
  	}
  //	static long gcd(long dsutytur,long b) { if(b==0) return dsutytur; return gcd(b,dsutytur%b); }
  }
   
  class DSU {
  	int par[];
  	int size[];
  	DSU(int n) {
  		par = new int[n];
  		size = new int[n];
  		Arrays.fill(size, 1);
  		for(int i=0;i<n;i++) par[i] = i;
  	}
  	int findPar(int x) {
  		if(x == par[x]) return x;
  		
  		return par[x] = findPar(par[x]);
  	}
  	boolean join(int u,int v) {
  		int fu = findPar(u);
  		int fv = findPar(v);
  		if(fu!=fv) {
  			if(size[fu]>size[fv]) {
  				par[fv] = fu;
  				size[fu] += size[fv];
  			}
  			else {
  				par[fu] = fv;
  				size[fv] += size[fu];
  			}
  			return true;
  		}
  		else return false;
  	}
  }
  
  class pair{
  	long val;
  	char c;
  	pair(long val, char c){
  		this.val = val;
  		this.c = c;
  	}
  }