Reverse a String
Easyjavapythonccppjavascript
Given a string, print the same string with its characters in reverse order.
Input Format
A single line containing the string S. It has no leading or trailing spaces.
Output Format
Print the reversed string.
Example 1
Input
hello
Output
olleh
Explanation: The characters are read from the last position to the first.
- 1 <= length of S <= 100000
- S consists of visible ASCII characters and spaces.