#C14772. Reverse a String

    ID: 44458 Type: Default 1000ms 256MiB

Reverse a String

Reverse a String

Given a string, your task is to reverse the string without using any built-in reversal functions. Instead, you must implement the reversal manually by iterating through the string.

Note: The input will be a single line string and could be very large, so make sure your solution is efficient.

If any formulas are needed, note that they should be formatted in LaTeX (e.g., \( \text{formula} \) ).

inputFormat

A single line containing the input string.

outputFormat

Output a single line which is the reversed version of the input string.## sample

hello
olleh