n=int(input()) for i in range(n): l=list(map(int,input().split())) l.pop(0) l.sort() l.reverse() print(*l)