#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[] = {"qwertyuiop", "asdfghjkl;", "zxcvbnm,./"}, k;
  char d;
  int i, j;
  cin >> d >> k;
  for (i = 0; i < k.size(); i++) {
    for (j = 0; j < 3; j++)
      if (s[j].find(k[i]) != string::npos) break;
    if (d == 'L')
      cout << s[j][s[j].find(k[i]) + 1];
    else
      cout << s[j][s[j].find(k[i]) - 1];
  }
}
