from sys import stdin, stdout input = stdin.readline def solve(): n = int(input()) a = list(map(int, input().split())) stdout.write(" ".join(map(str, a)) + "\n") t = int(input()) for _ in range(t): solve()