#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;

int main(){
  string str;
  int len;


  while( cin >> str ){
  
    reverse(str.begin(),str.end());
    //len = str.length();
    /*
  for(int i=len;i>=0;i--){
    cout << str[i];
    
  }
    */
    cout << str<<endl;

  

  }
}