#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main(void){
  string moji;
  while(cin >> moji){
    reverse(moji.begin(),moji.end());
    cout << moji << endl;
  }
  return 0;
}