This page is still under construction.

Parts of this page are still being built. What you see may change.

!terces poT

Time limit1sMemory limit256 MB

Summary
Reverse every input line except the final END line and print each decoded sentence in order.
Level

Easy1 of 10

Topics
String
Solved
No attempts yet

Problem

You pick up a strange note on the street. The note holds a cipher, and you work out that reversing the cipher gives back the original sentence.

Write a program that decodes the ciphers.

Input

Each line holds one cipher. A cipher is at most 500 characters long.

The last line is END. That line marks the end of the input and is not decoded. Only a line equal to END ends the input, so ENDING and end are decoded like any other cipher.

Output

Print the decoded sentence for each cipher, one per line, in input order.

Examples4

  1. Example 1

    Input
    !edoc doog a tahW
    noitacitsufbo
    erafraw enirambus detcirtsernu yraurbeF fo tsrif eht no nigeb ot dnetni eW
    lla sees rodroM fo drol eht ,ssertrof sih nihtiw delaecnoC
    END
    
    Expected output
    What a good code!
    obfustication
    We intend to begin on the first of February unrestricted submarine warfare
    Concealed within his fortress, the lord of Mordor sees all
    
  2. Example 2

    Input
    a
    END
    
    Expected output
    a
    
  3. Example 3

    Input
    level
    racecar
    aa
    END
    
    Expected output
    level
    racecar
    aa
    
  4. Example 4

    Input
    !321 ,olleH
    ?uoy era woH
    END
    
    Expected output
    Hello, 123!
    How are you?