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