#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1, s2;
  s = "qwertyuiopasdfghjkl;zxcvbnm,./";
  map<char, int> m;
  cin >> s1 >> s2;
  for (int i = 0; i < s.size(); i++) {
    m[s[i]] = i;
  }
  if (s1 == "R") {
    for (int i = 0; i < s2.size(); i++) {
      if (s2[i] == 'q' || s2[i] == 'q' || s2[i] == 'z')
        cout << s2[i];
      else
        cout << s[m[s2[i]] - 1];
    }
    cout << endl;
  } else {
    for (int i = 0; i < s2.size(); i++) {
      if (s2[i] == 'p' || s2[i] == ';' || s2[i] == '/')
        cout << s2[i];
      else
        cout << s[m[s2[i]] + 1];
    }
    cout << endl;
  }
  return 0;
}
