#include <iostream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
#define ll long long
#define sz(x) int(size(x))
void omar()
{
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
#endif
}

int main()
{
  omar();
  //////////////////////////////////////////////////////////////////////////////////////////
 
  string s;
  while(cin>>s)
 {
   reverse(s.begin(), s.end());
   cout << s<<" ";
 } 

  return 0;
}

