#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
char mm[200] = {};
for (int i = 'a'; i <= 'z'; i++)
mm[i] = i + 3 - 32;
mm['x'] = 'A';
mm['y'] = 'B';
mm['z'] = 'C';
for (int i = 'A'; i <= 'Z'; i++)
mm[i] = i + 3 + 32;
mm['X'] = 'a';
mm['Y'] = 'b';
mm['Z'] = 'c';
string s;
cin >> s;
reverse(s.begin(), s.end());
for (int i = 0; s[i]; i++)
cout << mm[s[i]];
return 0;
}