#include <bits/stdc++.h>
int a[2000], tmp[2000];
void gb(int s, int end) {
  if (s < end) {
    int mid = (s + end) / 2, i = s, j = mid + 1, k = s;
    gb(s, mid);
    gb(mid + 1, end);
    while (i <= mid && j <= end) {
      if (a[i] >= a[j])
        tmp[k++] = a[i++];
      else {
        tmp[k++] = a[j++];
      }
    }
    while (i <= mid) tmp[k++] = a[i++];
    while (j <= end) tmp[k++] = a[j++];
    for (i = s; i <= end; i++) a[i] = tmp[i];
  }
}
int main() {
  int n, m;
  while (~scanf("%d", &n)) {
    while (n--) {
      int m;
      scanf("%d", &m);
      for (int i = 0; i < m; i++) {
        scanf("%d", &a[i]);
      }
      gb(0, m - 1);
      for (int i = 0; i < m; i++) printf("%d ", a[i]);
      printf("\n");
    }
  }
  return 0;
}
