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 Bfs {
  	static Scanner sc = new Scanner(System.in);
  	static PrintWriter pw = new PrintWriter(System.out);
  	public static void sort(int[]in) {
  		shuffle(in);
  		Arrays.sort(in);
  	}
  	public static void shuffle(int[]in) {
  		for(int i=0;i<in.length;i++) {
  			int idx=(int)(Math.random()*in.length);
  			int tmp=in[i];
  			in[i]=in[idx];
  			in[idx]=tmp;
  		}
  	}
  	public static void main(String[] args) throws IOException, InterruptedException {
         int t=sc.nextInt();
         while(t-->0) {
      	   int n=sc.nextInt();
      	   int []arr=sc.nextIntArray(n);
      	   sort(arr);
      	   TreeMap<Integer, Integer> tm=new TreeMap<>();
      	   boolean []f=new boolean[n+1];
      	   f[0]=true;
      	   for(int i:arr)tm.put(i,tm.getOrDefault(i, 0)+1);
      	   int []dif=new int[n+1];
      	   for(int i=0;i<=n;i++) {
      		   Integer x=tm.floorKey(i);
      		   if(x==null) {
      			   f[i]=true;
      			   break;
      		   }
      		   else {
      			   dif[i]=i-x;
      			   int a=tm.get(x)-1;
      			   if(a==0)tm.remove(x);
      			   else tm.put(x, a);
      			   f[i]=true;
      		   }
      	   }
  //    	   pw.println(Arrays.toString(dif)+" "+Arrays.toString(f));
      	   int []rep=new int[n+1];
      	   for(int i:arr)rep[i]++;
      	   long []pre=new long[n];
      	   pre[0]=dif[0];
      	   for(int i=1;i<n;i++)pre[i]=pre[i-1]+dif[i];
      	   for(int i=0;i<=n;i++) {
      		   if(i==0)pw.print(rep[i]+" ");
      		   else if(!f[i])pw.print(-1+" ");
      		   else pw.print(pre[i-1]+rep[i]+" ");
      	   }
      	   pw.println();
         }
  		pw.flush();
  	}
  	
   	
  	static class tuble implements Comparable<tuble> {
  		long x;
  		long y;
  		long z;
  
  		public tuble(long x, long y, long z) {
  			this.x = x;
  			this.y = y;
  			this.z = z;
  		}
  
  		public String toString() {
  			return x + " " + y + " " + z;
  		}
  		public int compareTo(tuble other) {
  			if (this.x == other.x) {
  				return Long.compare(other.y, this.y);
  			}
  			return Long.compare(other.x, this.x);
  		}
  	}
  
  	static class pair implements Comparable<pair> {
  		long x;
  		long y;
   
  		public pair(long x, long y) {
  			this.x = x;
  			this.y = y;
  		}
   
  		public String toString() {
  			return x + " " + y;
  		}
   
  		public boolean equals(Object o) {
  			if (o instanceof pair) {
  				pair p = (pair) o;
  				return p.x == x && p.y == y;
  			}
  			return false;
  		}
   
  		public int hashCode() {
  			return new Double(x).hashCode() * 31 + new Double(y).hashCode();
  		}
   
  		public int compareTo(pair other) {
  			if (this.x == other.x) {
  				return Long.compare(other.y, this.y);
  			}
  			return Long.compare(other.x, this.x);
  		}
  	}
   
  	static class Scanner {
  		StringTokenizer st;
  		BufferedReader br;
   
  		public Scanner(InputStream s) {
  			br = new BufferedReader(new InputStreamReader(s));
  		}
   
  		public Scanner(FileReader r) {
  			br = new BufferedReader(r);
  		}
   
  		public String next() throws IOException {
  			while (st == null || !st.hasMoreTokens())
  				st = new StringTokenizer(br.readLine());
  			return st.nextToken();
  		}
   
  		public int nextInt() throws IOException {
  			return Integer.parseInt(next());
  		}
   
  		public long nextLong() throws IOException {
  			return Long.parseLong(next());
  		}
   
  		public String nextLine() throws IOException {
  			return br.readLine();
  		}
   
  		public double nextDouble() throws IOException {
  			String x = next();
  			StringBuilder sb = new StringBuilder("0");
  			double res = 0, f = 1;
  			boolean dec = false, neg = false;
  			int start = 0;
  			if (x.charAt(0) == '-') {
  				neg = true;
  				start++;
  			}
  			for (int i = start; i < x.length(); i++)
  				if (x.charAt(i) == '.') {
  					res = Long.parseLong(sb.toString());
  					sb = new StringBuilder("0");
  					dec = true;
  				} else {
  					sb.append(x.charAt(i));
  					if (dec)
  						f *= 10;
  				}
  			res += Long.parseLong(sb.toString()) / f;
  			return res * (neg ? -1 : 1);
  		}
   
  		public long[] nextlongArray(int n) throws IOException {
  			long[] a = new long[n];
  			for (int i = 0; i < n; i++)
  				a[i] = nextLong();
  			return a;
  		}
   
  		public Long[] nextLongArray(int n) throws IOException {
  			Long[] a = new Long[n];
  			for (int i = 0; i < n; i++)
  				a[i] = nextLong();
  			return a;
  		}
   
  		public int[] nextIntArray(int n) throws IOException {
  			int[] a = new int[n];
  			for (int i = 0; i < n; i++)
  				a[i] = nextInt();
  			return a;
  		}
   
  		public Integer[] nextIntegerArray(int n) throws IOException {
  			Integer[] a = new Integer[n];
  			for (int i = 0; i < n; i++)
  				a[i] = nextInt();
  			return a;
  		}
   
  		public boolean ready() throws IOException {
  			return br.ready();
  		}
   
  	}
  }