n = int(input()) for i in range(n): kl = list(map(int, input().split())) ll = kl[1:] ll.sort() ll = ll[::-1] print(*ll)