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

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  freopen("input.txt", "r", stdin);

  string s;
  cin >> s;

  if (s.size() == 3)
  {
    reverse(s.begin(), s.end());
  }

  cout << s << "\n";
  return 0;
}
