#include int main() { int n; scanf("%d", &n); int i, j; int k[22], l[22][22]; for (i = 0; i < n; i++) { scanf("%d", &k[i]); for (j = 0; j < k[i]; j++) scanf("%d", &l[i][j]); } for (i = 0; i < n; i++) { for (j = 0; j < k[i] - 1; j++) { if (l[i][j] < l[i][j + 1]) { l[i][j] ^= l[i][j + 1]; l[i][j + 1] ^= l[i][j]; l[i][j] ^= l[i][j + 1]; if (j > 0) j -= 2; } } } for (i = 0; i < n; i++) { for (j = 0; j < k[i] - 1; j++) printf("%d ", l[i][j]); printf("%d\n", l[i][k[i] - 1]); } return 0; }