n = int(input()) for _ in range(n): nums = [*map(int, input().split())] del nums[0] nums.sort(reverse=True) print(' '.join(map(str, nums)))