while True:
    try:
        a = list(input())#变为列表
        a = a[::-1] #逆序
        print(''.join(a)) #按要求输出
    except:
        break