while True:
    # Read line 
    line = input()
    
    # termination conditions
    if line.lower() in ["done", "d"]:
        break
    
    # Reverse and output the line
    print(line[::-1])
