n = int(input()) for _ in range(n): l = list(map(int, input().split())) l1 = l[1:] l1.sort(reverse=True) for num in l1: print(num,end = " ")