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.io.*;
  import java.util.*;
  import java.lang.Math;
  import static java.lang.Math.max;
  import static java.lang.Math.min;
  import static java.lang.Math.abs;
  
  
  
  public class Main {
  
  
       static PrintWriter pw;
       static Scanner sc;
       static StringBuilder ans;
       static long mod = 1000000000+7;
       static int MAX_I = Integer.MAX_VALUE;
       static int MIN_I = Integer.MIN_VALUE;
       static long MAX_L = Long.MAX_VALUE;
       static long MIN_L = Long.MIN_VALUE;
  
       static void pn(final Object arg) {      pw.print(arg);   pw.flush();      }     
        
  
       /*-------------- for input in an value ---------------------*/
       static int ni()     { return sc.nextInt();       }
       static long nl()    { return sc.nextLong();      }
       static double nd()  { return sc.nextDouble();    }
       static String ns()  { return sc.next();          }
       static String nLine() { return sc.nextLine(); }
  
  
       static void ap(int arg)           { ans.append(arg); }
       static void ap(long arg)          { ans.append(arg); }
       static void ap(String arg)        { ans.append(arg); }
       static void ap(StringBuilder arg) { ans.append(arg); }
       static void yes() { ap("Yes\n"); }
       static void no()  { ap("No\n"); }        
  
  
       /* for Dubuggin */
       static void printArr(int ar[], int st , int end) {   for(int i = st; i<=end; i++ )    ap(ar[i]+ " ");    ap("\n"); }
       static void printArr(long ar[], int st , int end) {   for(int i = st; i<=end; i++ )    ap(ar[i]+ " ");    ap("\n"); }     
       static void printArr(String ar[], int st , int end) {   for(int i = st; i<=end; i++ )    ap(ar[i]+ " ");    ap("\n"); }     
       static void printIntegerList(List<Integer> ar, int st , int end) {   for(int i = st; i<=end; i++ )    ap(ar.get(i)+ " ");    ap("\n"); }
       static void printLongList(List<Long> ar, int st , int end) {   for(int i = st; i<=end; i++ )    ap(ar.get(i)+ " ");    ap("\n"); }     
       static void printStringList(List<String> ar, int st , int end) {   for(int i = st; i<=end; i++ )    ap(ar.get(i)+ " ");    ap("\n"); }     
  
  
       /*-------------- for input in an array ---------------------*/
       static void readArray(int arr[]){
            for(int i=0; i<arr.length; i++)arr[i] = ni();
       }
       static void readArray(long arr[]){
            for(int i=0; i<arr.length; i++)arr[i] = nl(); 
       }
       static void readArray(String arr[]){
            for(int i=0; i<arr.length; i++)arr[i] = ns(); 
       }    
       static void readArray(double arr[]){
            for(int i=0; i<arr.length; i++)arr[i] = nd();
       }
  
  
       /*-------------- File vs Input ---------------------*/
       static void runFile() throws Exception {
            sc = new Scanner(new FileReader("input.txt"));
            pw = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
       }
       static void runIo() throws Exception  {
            pw =new PrintWriter(System.out);
            sc = new Scanner(System.in);
       }
  
  
       static boolean isPowerOfTwo (long x) { return x!=0 && ((x&(x-1)) == 0);}
  
       static long gcd(long a, long b) { if (b == 0) return a;     return gcd(b, a % b); }
  
       static long nCr(long n, long r) { // Combinations
            if (n < r)
                 return 0;
            if (r > n - r) { // because nCr(n, r) == nCr(n, n - r)
                 r = n - r;
            }
            long ans = 1L;
            for (long i = 0; i < r; i++) {
                 ans *= (n - i);
                 ans /= (i + 1);
            }
            return ans;
       }          
  
       static int countDigit(long n){return (int)Math.floor(Math.log10(n) + 1);} 
  
       static boolean isPrime(long n) { 
            if (n <= 1) return false; 
            if (n <= 3) return true; 
            if (n % 2 == 0 || n % 3 == 0) return false; 
  
            for (long i = 5; i * i <= n; i = i + 6) 
            if (n % i == 0 || n % (i + 2) == 0) 
                 return false; 
  
            return true; 
       }         
  
       static boolean sv[] = new boolean[10002];
        
  
       static void seive() {
  
            //true -> not prime
            // false->prime
  
            sv[0] = sv[1] = true; 
            sv[2] = false;
  
            for(int i = 0; i< sv.length; i++) {
                 if( !sv[i] && (long)i*(long)i < sv.length ) {
                      for ( int j = i*i; j<sv.length ; j += i ) {                
                       sv[j] = true;
                      }
                 }
            }
  
       }
  
  
       static long kadensAlgo(long ar[]) {
  
            int n = ar.length;
  
            long pre = ar[0];
            long ans = ar[0];                
  
            for(int i = 1; i<n; i++) {
                 pre = Math.max(pre + ar[i], ar[i]);
                 ans = Math.max(pre, ans);
            }
            return ans;
       }
  
  
       static long  binpow( long a,   long b) {
  
            long res = 1;
            while (b > 0) {
                 if ( (b & 1) > 0){
                      res = (res * a);              
                 }
                 a = (a * a);
                 b >>= 1;
            }
  
            return res;
       }
  
       static long factorial(long n)  {
            long res = 1, i;
            for (i = 2; i <= n; i++){
                 res  =  ((res%mod) * (i%mod))%mod;
            }          
            return res;
       } 
  
       static int getCountPrime(int n) {
   
            int ans = 0;
   
            while (n%2==0) { 
                 ans ++;
                 n /= 2; 
            }  
   
            for (int i = 3; i *i<= n; i+= 2) {  
                 while (n%i == 0) {  
                      ans ++;
                      n /= i; 
                 }
            }
   
            if(n > 1 )
                 ans++;
   
            return ans; 
       }    
       static void sort(int[] arr)    {
            /* because Arrays.sort() uses quicksort which is dumb
            Collections.sort() uses merge sort */
            ArrayList<Integer> ls = new ArrayList<Integer>();
            for(int x: arr)
                 ls.add(x);          
            Collections.sort(ls);
            for(int i=0; i < arr.length; i++)
                 arr[i] = ls.get(i);
  
      }     
  
       static void sort(long[] arr)    {
            /* because Arrays.sort() uses quicksort which is dumb
            Collections.sort() uses merge sort */
            ArrayList<Long> ls = new ArrayList<Long>();
            for(Long x: arr)
                 ls.add(x);          
            Collections.sort(ls);
            for(int i=0; i < arr.length; i++)
                 arr[i] = ls.get(i);
  
      }     
    
       static int upperBound(long ar[], long k, int l, int r) {
            
           while (l <= r) {
               int m = (l + r) >> 1 ;
               if (ar[m] > k) {
                   r = m - 1 ;
               } else {
                   l = m + 1 ;
               }
           }         
           return l ;
       }
  
       static int lowerBound(long ar[], long k, int l, int r) {
           
           while (l <= r) {
               int m = (l + r) >> 1 ;
               if (ar[m] >= k) {
                   r = m - 1 ;
               } else {
                   l = m + 1 ;
               }
           }
           return l ;
       } 
  
       static void findDivisor(int n, ArrayList<Integer> al) {
  
           for(int i = 1; i*i <= n; i++){
               if( n % i == 0){
                   if(n/i==i){
                       al.add(i);
                   }
                   else{
                       al.add(n/i);
                       al.add(i);
                   }
               }
           }
  
       }
   
       static class Pair{
       
          int a;
          int b;
          Pair( int a, int b){ 
            this.a = a;
            this.b = b;
          }
      }
       
    
  
  
        public static void main(String[] args)  throws Exception {
    
   
            // runFile();  
  
            runIo();              
  
            int t;
            t = 1;
    
            t =  sc.nextInt();  
                  
            ans = new StringBuilder();
             
            while( t-- > 0 ) {   
                 solve();
            }                
            
            pn(ans+""); 
   
       }   
   
  
       public static void solve ( ) {        
                      
  
            int n = ni();
  
            int ar[] = new int[n+1];
  
            for(int i = 0; i<n; i++) {
                 ar[ni()]++;
            }
  
            long ans[] = new long[n+1];
  
            long pre = 0 ;
  
            Arrays.fill(ans, -1l);
  
            ans[0] = ar[0];
  
            Stack<Pair> st = new Stack<>();
  
            if( ar[0] > 1 )
                 st.add(new Pair(0, ar[0]-1));
  
            for(int i = 1; i<=n; i++) {
                 
                 if( ar[i-1] > 0 ) {
               
                      ans[i] = pre + ar[i];
                      
                      if( ar[i] > 1 )
                           st.add(new Pair(i, ar[i]-1));                    
  
                      continue;
                 }
  
                 if( st.isEmpty() )  break;
  
                 Pair p = st.pop();
  
                 ans[i] = pre + ar[i] + i-1 - p.a;
                 
                 pre +=  i-1-p.a;
  
                 p.b--;
                 ar[i-1]++;
  
                 if( p.b > 0 )
                      st.add(p);
  
                 if( ar[i] > 1 )
                      st.add(new Pair(i, ar[i]-1));
  
                 
            }
  
            for(long i : ans)
                 ap(i+" ");
  
            ap("\n");
  
  
  
       }
  
  
  }
   
  
   
  
  