Reverse a String
Read a word and print its characters in reverse order.
Input format
A single line with one word S (no spaces).
Output format
Print S with its characters in reverse order.
Constraints
- Values fit in a 64-bit signed integer
- Trailing whitespace and a trailing newline are ignored by the judge
Read from stdin, write to stdout. Sample cases below show the exact format.
Sample cases
Example 1
Input
helloExpected output
ollehExample 2
Input
abcExpected output
cba