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