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: #include <bits/stdc++.h>
  #pragma GCC optimize("Ofast")
  using namespace std;
  long long max(long long a, long long b) {
    if (a > b)
      return a;
    else
      return b;
  }
  long long min(long long a, long long b) {
    if (a > b)
      return b;
    else
      return a;
  }
  long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
  inline long long lcm(long long a, long long b) {
    return a / gcd(a, b) * 1LL * b;
  }
  inline long long normalize(long long x, long long mod) {
    x %= mod;
    if (x < 0) x += mod;
    return x;
  }
  long long dx[4] = {0, 1, 0, -1};
  long long dy[4] = {1, 0, -1, 0};
  string abc = "abcdefghijklmnopqrstuvwxyz";
  const long long mod = 1000 * 1000 * 1000 + 7;
  const long long inf = 1e18 + 5;
  inline long long add(long long a, long long b, long long p = mod) {
    long long c = a + b;
    if (c >= p) c -= p;
    return c;
  }
  inline long long sub(long long a, long long b, long long p = mod) {
    long long c = a - b;
    if (c < 0) c += p;
    return c;
  }
  inline long long mul(long long a, long long b, long long p = mod) {
    return (a * 1LL * b) % p;
  }
  long long floor1(long long n, long long k) {
    if (n % k == 0 || n >= 0) return n / k;
    return (n / k) - 1;
  }
  long long ceil1(long long n, long long k) { return floor1(n + k - 1, k); }
  long long powm(long long a, long long b) {
    long long res = 1;
    while (b) {
      if (b & 1) res = (res * a) % mod;
      a = (a * a) % mod;
      b >>= 1;
    }
    return res;
  }
  const long long N = 2e5 + 5;
  long long n;
  long long a[N];
  long long f[N], g[N];
  void solve() {
    cin >> n;
    for (long long i = (1); i < (n + 1); ++i) cin >> a[i];
    for (long long i = (0); i < (n + 5); ++i) f[i] = g[i] = 0;
    for (long long i = (1); i < (n + 1); ++i) {
      ++f[a[i]];
    }
    g[0] = f[0];
    for (long long i = (1); i < (n + 1); ++i) {
      g[i] += g[i - 1] + (i + 1) * f[i];
    }
    for (long long i = (1); i < (n + 1); ++i) {
      f[i] += f[i - 1];
    }
    priority_queue<long long> q;
    vector<long long> ad(n + 5, 0);
    for (long long i = (0); i < (n + 1); ++i) {
      if (i == 0) {
        if (f[i] == 0) continue;
        for (long long j = (0); j < (f[i] - 1); ++j) {
          q.push(i);
        }
      } else if (i != 0 and f[i] - f[i - 1]) {
        if (f[i] - f[i - 1]) {
          for (long long j = (0); j < (f[i] - f[i - 1] - 1); ++j) {
            q.push(i);
          }
        }
        ad[i] += ad[i - 1];
      } else {
        if (((long long)q.size()) == 0) {
          ad[i] += ad[i - 1];
          ad[i] = -1;
          continue;
        }
        ad[i] = i - q.top();
        q.pop();
        ad[i] += ad[i - 1];
      }
    }
    long long flag = 1;
    long long ans = 0;
    for (long long i = (0); i < (n + 1); ++i) {
      if (flag == -1) {
        cout << -1 << " ";
        continue;
      }
      long long less = 0, cur = 0, lar = 0;
      if (i == 0) {
        cur = f[i];
        lar = n - cur;
        cout << cur << " ";
      } else {
        cur = f[i] - f[i - 1];
        lar = f[n] - f[i];
        less = f[i - 1];
        if (less < i) {
          flag = -1;
          cout << -1 << " ";
          continue;
        }
        if (i == n) {
          cout << ad[i - 1] << " ";
          continue;
        }
        ans = ad[i - 1] + cur;
        cout << ans << " ";
      }
    }
    cout << "\n";
  }
  signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(10);
    long long t = 1;
    cin >> t;
    for (long long i = (1); i < (t + 1); ++i) {
      solve();
    }
    return 0;
  }
  