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