N = int(input()) for _ in range(N): A = list(map(int, input().split())) print(*sorted(A[1:], reverse=True))