N = int(input()) A = [l for k, *l in [map(int, input().split()) for _ in range(N)]] for x in A: print(" ".join([str(num) for num in sorted(x, reverse = True)]))