#切片
print(input()[::-1])
#函数
print("".join(reversed(input())))