t = int(input()) for _ in range(t): n = int(input()) s = input().split() new_s = "".join(s) print(new_s[::-1])