a=0 for _ in range(int(input())): a,*p=(int,input().split()) p.sort() p.reverse() print(*p)