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

int main()
{
  string in;
  cin >> in;
  copy(in.rbegin(), in.rend(), ostream_iterator<char>(cout, ""));
  cout << endl;
}