#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
using namespace std;
typedef long long LL;
const int N=1e5+10,mod=1e6;
const int MAX = 1e8 + 10 ;
//直接调用函数 reverse
int main(){
string s ;
while(cin >> s){
reverse(s.begin() , s.end()) ;
cout << s<<endl;
}
}