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