#include <iostream> using namespace std; int main(){ int a[10000],i=0; while(a[i]==0){ cin>>a[i]; i++; } while(i>0){ cout<<a[i]; } return 0; }