n = int(input()) for _ in range(n): tmp = list(map(int, input().split())) print(*sorted(tmp[1:], reverse=True))