inline unsigned foo( unsigned n ) { return n/100%10*1 + n/10%10*10 + n/1%10*100; }
#include<stdio.h> int main() { int a,b,c,d; scanf("%d",&a); b=a/100; c=a%100/10; d=a%10; printf("%d\n",d*100+c*10+b); return 0; }