N = int(input().strip()) for i in range(N): array = list(map(int, input().strip().split())) array.pop(0) array.sort(reverse=True) grid.append(array) for a in grid: print(*a)