#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;

  if (s.size() != 2)
    reverse(s.begin(), s.end());
  cout << s << endl;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s[1500];
    int i,n;
    cin>>s;
    n=strlen(s);
    if(n==2){
        cout<<s;
    }
    else{
        for(i=n-1;i>=0;i--){
            cout<<s[i];
        }
    }
return 0;


    }

