#include <bits/stdc++.h>

using namespace std;

void process(string str, string& res){
    reverse(str.begin(), str.end());
    res = str;
}

int main(){
    string str = "";
    while(getline(cin, str)){
        string res = "";
        
        process(str, res);
        
        cout << res << endl;
    }
    
    return 0;
}