while True:
    try:
        l = input()
        print(''.join(reversed(l)))
    except:
        break