for i in range(int(input().split()[0])):print(input()[::-1])