n = int(input()) for i in range(n): k = list(map(int, input().split())) l = k[1:] l.sort(reverse=True) print(*l)