#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  long long int i, j, k, l, a, b, c, N, T, n, m;
  cin >> T;
  while (T--) {
    cin >> n;
    vector<long long int> vvj;
    for (i = 0; i < n; i++) {
      cin >> a;
      vvj.push_back(a);
    }
    for (i = 0; i < n; i++) {
      for (j = i + 1; j < (n); j++) {
        if ((i - vvj[i]) == (j - vvj[j])) {
          swap(vvj[i], vvj[j]);
          i = -1;
          break;
        }
      }
    }
    for (i = 0; i < n; i++) {
      cout << vvj[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
