#include <bits/stdc++.h>
using namespace std;
char a;
string s;
vector<string> v = {"qwertyuiop", "asdfghjkl;", "zxcvbnm,./"};
int main() {
  cin >> a >> s;
  if (a == 'R') {
    for (int j = 0; j < s.size(); j++)
      for (int i = 0; i < 3; i++)
        if (v[i].find(s[j]) < v[i].size()) {
          int p = v[i].find(s[j]);
          cout << v[i][p - 1];
        }
  } else {
    for (int j = 0; j < s.size(); j++)
      for (int i = 0; i < 3; i++)
        if (v[i].find(s[j]) < v[i].size()) {
          int p = v[i].find(s[j]);
          cout << v[i][p + 1];
        }
  }
  cout << endl;
}
