#t39. 数字按位逆序输出

数字按位逆序输出

Reverse the Digits

Problem Description

Each time, read in a positive integer, then output its digits in reverse order. Note: when the input number ends with 0, the output must not have leading zeros. For example, if the input is 700, the output should be 7.

(Terminology: reversing the digits means rearranging the digits of a number from right to left; for example, 123 reversed gives 321.)

Input Format

Each test case is a positive integer n (n < 100000000).

Output Format

Output the number with its digits reversed.

Sample Input

1234567

Sample Output

7654321

Constraints

1 ≤ n < 10^8