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: //jai Shree Krishna
  import java.io.BufferedReader;
  import java.io.BufferedWriter;
  import java.io.IOException;
  import java.util.Collections;
  import java.io.InputStreamReader;
  import java.io.PrintWriter;
  import java.util.Comparator;
  import java.util.Stack;
  import java.io.OutputStreamWriter;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.StringTokenizer;
  public class A{
  // author: Tarun Verma
  	static FastScanner sc = new FastScanner();
  	static int inf = Integer.MAX_VALUE;
  	static long mod = 1000000007;
  	static BufferedWriter output = new BufferedWriter(
  			new OutputStreamWriter(System.out));
  	static PrintWriter out=new PrintWriter(System.out);
  	/* Common Mistakes By Me
  	 * make sure to read the bottom part of question
  	 * special cases (n=1?)
  	 * in BIT MASKING try don't forget a^b=c == a^c=b
  	 * READ READ AND READ THE Test Cases VERY PROPERLY AND NEVER BE OVERCONFIDENT
  	 * Always Reset vis,adj array upto n+1 otherwise can cause TLE
  	 * Try to see array from back in increase and decrease questions
  	 */
  	public static void solve() {
  		int n = sc.nextInt();
  		int arr[] = sc.readArray(n);
  		long cnt [] = new long[n+1];
  		
  		for(int i: arr) cnt[i] ++;
  		
  		Stack<Integer> st = new Stack<>();
  		
  		long ans[] = new long[n+1];
  		Arrays.fill(ans,  -1);
  		
  		
  		long tillNow  = 0;
  		
  		for(int i =0;i<=n;i++) {
  			if(i > 0 && cnt[i-1] == 0) {
  				if(st.isEmpty())
  					break;
  				int j = st.peek();
  				st.pop();
  				tillNow += i - 1 - j;
  			}
  			ans[i] = tillNow + cnt[i];
  			while(i > 0 && cnt[i-1] > 1) {
  				cnt[i-1]--;
  				st.push(i-1);
  			}
  		}
  		for(long i: ans) {
  			System.out.print(i+ " ");
  		}System.out.println();
  		
  	}
  	public static void main(String[] args) {
  		int t = 1;
  		t = sc.nextInt();
  		outer: for (int tt = 0; tt < t; tt++) {
  			solve();
  		}
  	}
  	
  ////////////////////////////////////////////////////////////////////////////////////
  ////////////////////DO NOT BELOW THIS LINE //////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////
  	static Comparator<pair> comp = new Comparator<pair>() {
  		@Override
  		public int compare(pair o1, pair o2) {
  			if(o1.fr == o2.fr) {
  				return o1.sc - o2.sc;
  			}
  			return o1.fr - o2.fr;
  		}
  	};
  	static int max(int a, int b) { return Math.max(a, b);} 
  	static int min(int a, int b) {return Math.min(a, b);}
  	static long max(long a, long b){return Math.max(a, b);}
  	static long min(long a, long b) {return Math.min(a, b);}
  	static void sort(int arr[]) {
  		ArrayList<Integer> a = new ArrayList<Integer>();
  		for(int i: arr) a.add(i);
  		Collections.sort(a);
  		for(int i=0;i<arr.length;i++) arr[i] = a.get(i);
  	}
  	static void sort(long arr[]) {
  		ArrayList<Long> a = new ArrayList<Long>();
  		for(long i: arr) a.add(i);
  		Collections.sort(a);
  		for(int i=0;i<arr.length;i++) arr[i] = a.get(i);
  	}
  	static int abs(int a) {return Math.abs(a);}
  	static long abs(long a) {return Math.abs(a);}
  	static int gcd(int a, int b) {
  		if (b == 0)
  			return a;
  		return gcd(b, a % b);
  	}
  	static long gcd(long a, long b) {
  		if (b == 0)
  			return a;
  		return gcd(b, a % b);
  	}
  	
  	static class FastScanner {
  		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  		StringTokenizer st = new StringTokenizer("");
  		
  		String next() {
  			while (!st.hasMoreTokens())
  				try {
  					st = new StringTokenizer(br.readLine());
  				} catch (IOException e) {
  					e.printStackTrace();
  				}
  			return st.nextToken();
  		}
  		int nextInt() {
  			return Integer.parseInt(next());
  		}
  		int[] readArray(int n) {
  			int[] a = new int[n];
  			for (int i = 0; i < n; i++)
  				a[i] = nextInt();
  			return a;
  		}
  		long[] readLongArray(int n) {
  			long[] a = new long[n];
  			for (int i = 0; i < n; i++)
  				a[i] = nextLong();
  			return a;
  		}
  		
  		int[][] read2dArray(int n, int m) {
  			int arr[][] = new int[n][m];
  			for (int i = 0; i < n; i++) {
  				for (int j = 0; j < m; j++) {
  					arr[i][j] = nextInt();
  				}
  			}
  			return arr;
  		}
  		
  		ArrayList<Integer> readArrayList(int n) {
  			ArrayList<Integer> arr = new ArrayList<Integer>();
  			for (int i = 0; i < n; i++) {
  				int a = nextInt();
  				arr.add(a);
  			}
  			return arr;
  		}
  		
  		long nextLong() {
  			return Long.parseLong(next());
  		}
  	}
  	
  	static class pair {
  		int fr, sc;
  		
  		pair(int fr, int sc) {
  			this.fr = fr;
  			this.sc = sc;
  		}
  	}
  	
  ////////////////////////////////////////////////////////////////////////////////////	
  	
  }
  