n = int(input()) for i in range(n): parts = input().split() p = list(map(int, parts)) a = p[0] del p[0] p.sort(reverse=True) for j in range(a): if j != a-1: print(p[j], end=" ") else: print(p[j])