#include<iostream>
#include<string>
using namespace std;
int main(){
  string word;
  while(getline(cin,word)){
    for(int i=word.size()-1; i>=0; i--){
      cout <<word[i];
    }
    cout <<endl;
  }
  return 0;
}