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.*;
  
  public class Main {
  	public static void main(String[] args) throws FileNotFoundException,IOException,Exception {
          boolean isFile = true;
          isFile &= false;
          ScanReader in;PrintWriter out;
  
          if(isFile) {
              InputStream inputStream = new FileInputStream("input.txt");
              in = new ScanReader(inputStream,new BufferedReader(new FileReader("input.txt")));
              out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
  
          } else {
              InputStream inputStream = System.in;
              in = new ScanReader(inputStream,new BufferedReader(new InputStreamReader(System.in)));
              out = new PrintWriter(System.out);
          }
  
          Palindrome solver = new Palindrome();
  
          int t = 1;
          t = in.nextInt();
  
          for (int i = 0; i < t; i++) {
              solver.solve(i + 1, in, out);
          }
  
          out.close();
  	}
  
      static class Palindrome {
          static long mod = 1000000007;
          static long maxX = (long) 1e18;
          static long mod2 = 998244353;
  
          //  Check for boundary Condition because you are not Sehwag..
          //  For multiple Test cases take all input -> do not use return while taking input.
          //  at least check constraint for once it can be done in nested loops.
          //  Think simple and short
          //  check for proof of solution
          //  Read editorial after contest.....
  
          void solve(int testNumber, ScanReader in, PrintWriter out) throws Exception {
              int n = in.nextInt();
  
              int[] a = new int[n];
              HashMap<Integer, Integer> map = new HashMap<>();
  
              for(int i = 0;i<n;i++) {
                  a[i] = in.nextInt();
                  map.put(a[i], map.getOrDefault(a[i], 0) + 1);
              }
  
              Arrays.sort(a);
  
              Stack<Integer> st = new Stack<>();
              long[] ans = new long[n+1];
  
              Arrays.fill(ans, -1);
              long sum = 0;
  
              for(int i = 0;i<=n;i++) {
  
                  if(i>0 && map.getOrDefault(i-1, 0) == 0) {
                      if(st.isEmpty()) break;
  
                      int k = st.pop();
                      sum += i - 1 - k;
                  }
  
                  ans[i]= sum + map.getOrDefault(i, 0);
  
                  while(i>0 && map.getOrDefault(i-1, 0) > 1) {
                      map.put(i-1, map.get(i-1) - 1);
                      st.push(i-1);
                  }
              }
              for(long x : ans) {
                  out.print(x + " ");
              }
              out.println();
          }  
      }
  
      
      static class ScanReader {
          private final InputStream stream;
          private byte[] buf = new byte[1024];
          private int curChar;
          private int numChars;
          private SpaceCharFilter filter;
          private BufferedReader br;
  
          public ScanReader(InputStream stream,BufferedReader br) {
          this.stream = stream;
              this.br = br;
          }
  
          public int read() {
              if (numChars == -1)
                  throw new InputMismatchException();
  
              if (curChar >= numChars) {
                  curChar = 0;
                  try {
                      numChars = stream.read(buf);
                  } catch (IOException e) {
                      throw new InputMismatchException();
                  }
  
                  if (numChars <= 0)
                      return -1;
              }
              return buf[curChar++];
          }
  
          public String nextLine() {
              String str = "";
              try {
                  str = br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
  
          public int nextInt() {
              int c = read(); 
  
              while (isSpaceChar(c))
                  c = read();
  
              int sgn = 1;
  
              if (c == '-') {
                  sgn = -1;
                  c = read();
              }
  
              int res = 0;
              do {
                  if (c < '0' || c > '9')
                      throw new InputMismatchException();
                  res *= 10;
                  res += c - '0';
                  c = read();
              }
              while (!isSpaceChar(c));
  
              return res * sgn;
          }
  
          public long nextLong() {
              int c = read();
              while (isSpaceChar(c))
                  c = read();
              int sgn = 1;
              if (c == '-') {
                  sgn = -1;
                  c = read();
              }
              long res = 0;
  
              do {
                  if (c < '0' || c > '9')
                      throw new InputMismatchException();
                  res *= 10;
                  res += c - '0';
                  c = read();
              }
              while (!isSpaceChar(c));
              return res * sgn;
          }
  
          public double nextDouble() {
              int c = read();
              while (isSpaceChar(c))
                  c = read();
              int sgn = 1;
              if (c == '-') {
                  sgn = -1;
                  c = read();
              }
              double res = 0;
              while (!isSpaceChar(c) && c != '.') {
                  if (c == 'e' || c == 'E')
                      return res * Math.pow(10, nextInt());
                  if (c < '0' || c > '9')
                      throw new InputMismatchException();
                  res *= 10;
                  res += c - '0';
                  c = read();
              }
              if (c == '.') {
                  c = read();
                  double m = 1;
                  while (!isSpaceChar(c)) {
                      if (c == 'e' || c == 'E')
                          return res * Math.pow(10, nextInt());
                      if (c < '0' || c > '9')
                          throw new InputMismatchException();
                      m /= 10;
                      res += (c - '0') * m;
                      c = read();
                  }
              }
              return res * sgn;
          }
  
          public String readString() {
              int c = read();
              while (isSpaceChar(c))
                  c = read();
              StringBuilder res = new StringBuilder();
              do {
                  res.appendCodePoint(c);
                  c = read();
              }
              while (!isSpaceChar(c));
  
              return res.toString();
          }
  
          public boolean isSpaceChar(int c) {
              if (filter != null)
                  return filter.isSpaceChar(c);
              return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
          }
  
          public String next() {
              return readString();
          }
  
          public interface SpaceCharFilter {
              public boolean isSpaceChar(int ch);
          }
      }
  }