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