#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define FAST_IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main(){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    string str;
    while(cin>>str){
        if(str.length()!=2)
            reverse(str.begin(),str.end());
        cout<<str<<endl;
    }
    return 0;
}

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  string s;cin>>s;
  if(s.size()==2)cout<<s;
  else rep(i, 3)cout<<s[2-i];
  return 0;
}