#include<stdio.h> int main() { int s,a,b,c; while(scanf("%d",&s)!=EOF) { a=s/100; b=s%100/10; c=s%100%10; printf("%d%d%d",c,b,a); } return 0; }