#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using db = double;
using str = string;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;
using vi = vector<int>;
using vl = vector<ll>;
void divisors(map<int, int>& d, ll N) {
  for (int div : {2, 3, 5}) {
    int cnt = 1;
    if (N % 2 == 0) {
      while ((N % 2) == 0) {
        N /= 2;
        cnt++;
      }
      d[div] = cnt;
    }
  }
  static array<int, 8> increments = {4, 2, 4, 2, 4, 6, 2, 6};
  int i = 0;
  for (ll div = 7; div * div <= N; div += increments[i++]) {
    if ((N % div) == 0) {
      int cnt = 1;
      while ((N % i) == 0) {
        N /= i;
        cnt++;
      }
      d[i] = cnt;
    }
    if (i == 8) i = 0;
  }
  if (N > 1) d[N] = 2;
}
int main() {
  int T, N;
  cin >> T;
  while (T--) {
    cin >> N;
    vi v(N);
    for (int i = 0; i < N; i++) cin >> v[i];
    sort(begin(v), end(v));
    reverse(begin(v), end(v));
    for (auto& x : v) {
      cout << x << " ";
    }
    cout << "\n";
  }
  return 0;
}
