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