#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int b[n];
  for (int i = 1; i < n; i++) {
    b[i] = a[i - 1];
  }
  b[0] = a[n - 1];
  cout << b[0] << " ";
  for (int i = 1; i < n; i++) {
    cout << b[n - i] << " ";
  }
  cout << endl;
  return;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
