while 1:
    try:
        n = input()
        for i in range(1,5):
            print(n[-i],end="")
    except:
        break