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.OutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.PrintWriter;
  import java.io.PrintStream;
  import java.util.PriorityQueue;
  import java.util.HashMap;
  import java.util.Random;
  import java.util.AbstractCollection;
  import java.util.Comparator;
  import java.io.InputStream;
  
  /**
   * Built using CHelper plug-in
   * Actual solution is at the top
   *
   * @author sarthakmanna
   */
  public class Main {
      public static void main(String[] args) {
          InputStream inputStream = System.in;
          OutputStream outputStream = System.out;
          FastReader in = new FastReader(inputStream);
          PrintWriter out = new PrintWriter(outputStream);
          EMEXAndIncrements solver = new EMEXAndIncrements();
          int testCount = Integer.parseInt(in.next());
          for (int i = 1; i <= testCount; i++)
              solver.solve(i, in, out);
          out.close();
      }
  
      static class EMEXAndIncrements {
          final static Helper hp = new Helper();
          int N;
          HashMap<Integer, Integer> map;
  
          public void fillInputParams(FastReader in) {
              N = in.nextInt();
              map = new HashMap<>();
              for (int i = 0; i < N; ++i) {
                  int ele = in.nextInt();
                  map.putIfAbsent(ele, 0);
                  map.put(ele, map.get(ele) + 1);
              }
          }
  
          Object solveOptimised(FastReader in) {
              PriorityQueue<Integer> pq = new PriorityQueue<>(Comparator.reverseOrder());
              long[] ans = new long[N + 1];
  
              for (int i = 1; i <= N; ++i) {
                  for (int j = 0; j < map.getOrDefault(i - 1, 0); ++j) {
                      pq.add(i);
                  }
                  if (pq.isEmpty()) {
                      for (int j = i; j <= N; ++j) ans[j] = -1;
                      break;
                  }
                  ans[i] = ans[i - 1] + i - pq.poll();
              }
              for (int j = 0; j < N && ans[j] >= 0; ++j) {
                  ans[j] += map.getOrDefault(j, 0);
              }
  
              return hp.joinElements(ans);
          }
  
          Object solveBrute(FastReader in) {
              return null;
          }
  
          public void solve(int testNumber, FastReader in, PrintWriter out) {
              // out.print("Case #" + testNumber + ": ");
  
              fillInputParams(in);
              Object outOptimised = solveOptimised(in);
              Object outBrute = solveBrute(in);
              if (outBrute == null) {
                  out.println(outOptimised);
              } else if (outBrute.toString().equals(outOptimised.toString())) {
                  System.out.println(testNumber + ". OK Checked");
              } else {
                  // print input params
                  System.err.println("Actual = " + outOptimised);
                  System.err.println("Expected = " + outBrute);
                  System.out.println();
                  throw new ArithmeticException();
              }
          }
  
      }
  
      static class Helper {
          public final long MOD;
          public final int MAXN;
          final Random rnd;
  
          public Helper() {
              MOD = 1000_000_007;
              MAXN = 1000_006;
              rnd = new Random();
          }
  
          public Helper(long mod, int maxn) {
              MOD = mod;
              MAXN = maxn;
              rnd = new Random();
          }
  
          public String joinElements(long... ar) {
              StringBuilder sb = new StringBuilder();
              for (long itr : ar) sb.append(itr).append(" ");
              return sb.toString().trim();
          }
  
      }
  
      static class FastReader {
          static final int BUFSIZE = 1 << 20;
          static byte[] buf;
          static int index;
          static int total;
          static InputStream in;
  
          public FastReader(InputStream is) {
              try {
                  in = is;
                  buf = new byte[BUFSIZE];
              } catch (Exception e) {
              }
          }
  
          private int scan() {
              try {
                  if (index >= total) {
                      index = 0;
                      total = in.read(buf);
                      if (total <= 0)
                          return -1;
                  }
                  return buf[index++];
              } catch (Exception | Error e) {
                  System.err.println(e.getMessage());
                  return 13 / 0;
              }
          }
  
          public String next() {
              int c;
              for (c = scan(); c <= 32; c = scan()) ;
              StringBuilder sb = new StringBuilder();
              for (; c > 32; c = scan())
                  sb.append((char) c);
              return sb.toString();
          }
  
          public int nextInt() {
              int c, val = 0;
              for (c = scan(); c <= 32; c = scan()) ;
              boolean neg = c == '-';
              if (c == '-' || c == '+')
                  c = scan();
              for (; c >= '0' && c <= '9'; c = scan())
                  val = (val << 3) + (val << 1) + (c & 15);
              return neg ? -val : val;
          }
  
      }
  }
  
  