#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int n[t];
  int res[t][100];
  for (int a = 0; a < t; a++) {
    int p, q;
    cin >> n[a];
    int in[n[a]];
    for (int b = 0; b < n[a]; b++) {
      cin >> in[b];
    }
    for (int d = 0; d < n[a]; d++) {
      p = in[0];
      q = 0;
      for (int c = 0; c < n[a]; c++) {
        if (in[c] > p) {
          p = in[c];
          q = c;
        }
      }
      res[a][d] = p;
      in[q] = 0;
    }
  }
  for (int e = 0; e < t; e++) {
    for (int f = 0; f < n[e]; f++) {
      cout << res[e][f] << " ";
    }
    cout << endl;
  }
  return 0;
}
