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 MEXandIncrements {
  
      static FastScanner fs;
      static FastWriter fw;
      static boolean checkOnlineJudge = System.getProperty("ONLINE_JUDGE") == null;
  
      private static final int iMax = (int) (1e9), iMin = (int) (-1e9);
      private static final long lMax = (int) (1e15), lMin = (int) (-1e15);
      private static final int mod = (int) (1e9 + 7);
  
      public static void main(String[] args) throws IOException {
  
          fs = new FastScanner();
          fw = new FastWriter();
  
          int t = 1;
          t = fs.nextInt();
          while (t-- > 0) {
              solve();
          }
  
          fw.out.close();
      }
  
      private static void solve() {
  
          int n = fs.nextInt();
  
          TreeSet<Integer> tree_set = new TreeSet<>();
          Integer[] freq = new Integer[n + 1];
          Arrays.fill(freq, 0);
          for (int i = 0; i < n; i++) {
              int temp = fs.nextInt();
              tree_set.add(temp);
              freq[temp]++;
          }
  
          Long[] dp = new Long[n + 1];
          Arrays.fill(dp, -1L);
          dp[0] = (long) freq[0];
          for (int i = 1; i <= n; i++) {
              long temp = dp[i - 1] - freq[i - 1];
              Integer val = i - 1;
              if (tree_set.contains(val)) {
                  dp[i] = temp + freq[i];
                  freq[val]--;
                  if (freq[val] == 0)
                      tree_set.remove(val);
                  continue;
              }
  
              Integer val2 = tree_set.lower(val);
              if (val2 == null)
                  break;
  
              dp[i] = temp + (val - val2) + freq[i];
              freq[val2]--;
              if (freq[val2] == 0)
                  tree_set.remove(val2);
          }
  
          displayArr(dp);
      }
  
      private static class UnionFind {
  
          private final int[] parent;
  
          UnionFind(int n) {
              parent = new int[n];
              for (int i = 0; i < n; i++)
                  parent[i] = i;
          }
  
          private int getParent(int i) {
              if (parent[i] == i)
                  return i;
              return parent[i] = getParent(parent[i]);
          }
  
          private void unify(int i, int j) {
              int p1 = getParent(i);
              int p2 = getParent(j);
              if (p1 != p2)
                  parent[p1] = p2;
          }
      }
  
      private static int gcd(int a, int b) {
          return (b == 0 ? a : gcd(b, a % b));
      }
  
      private static long pow(long a, long b) {
          long result = 1;
          while (b > 0) {
              if ((b & 1L) == 1) {
                  result = (result * a) % mod;
              }
              a = (a * a) % mod;
              b >>= 1;
          }
  
          return result;
      }
  
      private static int ceilDiv(int a, int b) {
          return ((a + b - 1) / b);
      }
  
      private static List<Integer> primes(int n) {
  
          boolean[] primeArr = new boolean[n + 5];
          Arrays.fill(primeArr, true);
          for (int i = 2; (i * i) <= n; i++) {
              if (primeArr[i]) {
                  for (int j = i * i; j <= n; j += i) {
                      primeArr[j] = false;
                  }
              }
          }
  
          List<Integer> primeList = new ArrayList<>();
          for (int i = 2; i <= n; i++) {
              if (primeArr[i])
                  primeList.add(i);
          }
  
          return primeList;
      }
  
      private static class Pair<U, V> {
  
          private final U first;
          private final V second;
  
          @Override
          public boolean equals(Object o) {
              if (this == o) return true;
              if (o == null || getClass() != o.getClass()) return false;
              Pair<?, ?> pair = (Pair<?, ?>) o;
              return first.equals(pair.first) && second.equals(pair.second);
          }
  
          @Override
          public int hashCode() {
              return Objects.hash(first, second);
          }
  
          @Override
          public String toString() {
              return "(" + first + ", " + second + ")";
          }
  
          private Pair(U ff, V ss) {
              this.first = ff;
              this.second = ss;
          }
      }
  
      private static <T> void randomizeArr(T[] arr, int n) {
          Random r = new Random();
          for (int i = (n - 1); i > 0; i--) {
              int j = r.nextInt(i + 1);
              swap(arr, i, j);
          }
      }
  
      private static Integer[] readIntArray(int n) {
          Integer[] arr = new Integer[n];
          for (int i = 0; i < n; i++)
              arr[i] = fs.nextInt();
          return arr;
      }
  
      private static List<Integer> readIntList(int n) {
          List<Integer> list = new ArrayList<>();
          for (int i = 0; i < n; i++)
              list.add(fs.nextInt());
          return list;
      }
  
      private static <T> void swap(T[] arr, int i, int j) {
          T temp = arr[i];
          arr[i] = arr[j];
          arr[j] = temp;
      }
  
      private static <T> void displayArr(T[] arr) {
          for (T x : arr)
              fw.out.print(x + " ");
          fw.out.println();
      }
  
      private static <T> void displayList(List<T> list) {
          for (T x : list)
              fw.out.print(x + " ");
          fw.out.println();
      }
  
      private static class FastScanner {
          BufferedReader br;
          StringTokenizer st;
  
          FastScanner() throws IOException {
              if (checkOnlineJudge)
                  this.br = new BufferedReader(new FileReader("src/input.txt"));
              else
                  this.br = new BufferedReader(new InputStreamReader(System.in));
  
              this.st = new StringTokenizer("");
          }
  
          public String next() {
              while (!st.hasMoreTokens()) {
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException err) {
                      err.printStackTrace();
                  }
              }
              return st.nextToken();
          }
  
          public String nextLine() {
              if (st.hasMoreTokens()) {
                  return st.nextToken("").trim();
              }
              try {
                  return br.readLine().trim();
              } catch (IOException err) {
                  err.printStackTrace();
              }
              return "";
          }
  
          public int nextInt() {
              return Integer.parseInt(next());
          }
  
          public long nextLong() {
              return Long.parseLong(next());
          }
  
          public double nextDouble() {
              return Double.parseDouble(next());
          }
      }
  
      private static class FastWriter {
          PrintWriter out;
  
          FastWriter() throws IOException {
              if (checkOnlineJudge)
                  out = new PrintWriter(new FileWriter("src/output.txt"));
              else
                  out = new PrintWriter(System.out);
          }
      }
  }
  