#include<stdio.h> int main() { int a[200],i; for(i=0;;i++) { scanf("%d",&a[i]); if(a[i]==0) break; } for(i--;i>0;i--) printf("%d",a[i]); return 0; }