#C1190. Reverse a String

    ID: 41267 Type: Default 1000ms 256MiB

Reverse a String

Reverse a String

You are given a non-empty string (s). Your task is to reverse the string without using any built-in reverse functions. Read the input from standard input and output the reversed string to standard output.

For example, if (s = \texttt{hello}), your program should output (\texttt{olleh}).

inputFormat

The input consists of a single line containing the string (s) to be reversed. The string may contain spaces, punctuation, and other characters.

outputFormat

Output the reversed string on a single line.## sample

hello
olleh