n = int(input()) for i in range(n): l = list(map(int,input().split()))[1:] l.sort(key=lambda x:-x) print(*l)