#include<iostream>
#include<cstdio>
using namespace std;
union
{
int i;
char c[4];
} A,B;
int main()
{
while( scanf("%d",&A.i)==1 )
{
B.c[0]=A.c[3];
B.c[1]=A.c[2];
B.c[2]=A.c[1];
B.c[3]=A.c[0];
printf("%d converts to %d\n",A.i,B.i);
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNzdGRpbz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdW5pb24KewoJaW50IGk7CgljaGFyIGNbNF07Cn0gQSxCOwppbnQgbWFpbigpCnsKCXdoaWxlKCBzY2FuZigiJWQiLCZBLmkpPT0xICkKCXsKCQlCLmNbMF09QS5jWzNdOwoJCUIuY1sxXT1BLmNbMl07CgkJQi5jWzJdPUEuY1sxXTsKCQlCLmNbM109QS5jWzBdOwoJCXByaW50ZigiJWQgY29udmVydHMgdG8gJWRcbiIsQS5pLEIuaSk7Cgl9CglyZXR1cm4gMDsKfQ==