#include <iostream>
#include <iterator>
#include<string>
#include<algorithm>
using namespace std;

int main() {
    int a;
    while (cin >> a ) { // 注意 while 处理多个 case
        string ans;
        ans=to_string(a);
        reverse(ans.begin(),ans.end());
        cout <<ans<< endl;
    }
    return 0;
}
// 64 位输出请用 printf("%lld")