#include <bits/stdc++.h>
using namespace std;
int main() {
  string str1, str2, str3, str4;
  char x;
  str1 = "qwertyuiop";
  str2 = "asdfghjkl;";
  str3 = "zxcvbnm,./";
  str1 = str1 + str2 + str3;
  cin >> x >> str4;
  if (x == 'R') {
    string::iterator it, iit;
    for (it = str4.begin(); it < str4.end(); it++) {
      for (iit = str1.begin(); iit < str1.end(); iit++) {
        if (*it == *(iit)) {
          cout << *(iit - 1);
        }
      }
    }
  } else {
    string::iterator it, iit;
    for (it = str4.begin(); it < str4.end(); it++) {
      for (iit = str1.begin(); iit < str1.end(); iit++) {
        if (*it == *(iit)) {
          cout << *(iit + 1);
        }
      }
    }
  }
  return 0;
}
