Reverse Integer
import java.util.*;
public class Solution {
public static int reverse(int x) {
int a=x,tmp=0,i;
int []b=new int[32];
for(i=0;i<32;i++){
if(a!=0){
b[i]=a%10;
a=a/10;
}
else
break;
}
int in=1;
for(int j=i-1;j>=0;j--){
tmp+=b[j]*in;
in*=10;
}
return tmp;
// int res = 0;
// while (x != 0) {
// res = res * 10 + x % 10;
// x = x / 10;
// }
// return res;
}
public static void main(String[] args){
Scanner cin=new Scanner(System.in);
while(cin.hasNextInt()){
int n=cin.nextInt();
System.out.println(Solution.reverse(n));
}
}
}