#include <iostream>
using namespace std;

void reverse(string & s){
    int start=0;
    int end = s.size()-1;
    while(start<end){
        char temp = s[start];
        s[start] = s[end];
        s[end] = temp;
        start+=1;
        end-=1;
    }
}

int main() {
    string s;
    while(cin>>s){
        reverse(s);
        cout<<s<<endl;
    }
}
// 64 位输出请用 printf("%lld")