#include <bits/stdc++.h>
using namespace std;
struct parr {
  bool inside;
  int position;
};
parr instring(char c, string &s) {
  parr parcito;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == c) {
      parcito.inside = true;
      parcito.position = i;
      return parcito;
    }
  }
  parcito.inside = false;
  parcito.position = 0;
  return parcito;
}
int main() {
  char direction;
  string r1, rr1;
  string r2, rr2;
  string r3, rr3;
  rr1 = "qwertyuiop";
  rr2 = "asdfghjkl;";
  rr3 = "zxcvbnm,./";
  string s;
  cin >> direction;
  cin >> s;
  if (direction == 'R') {
    r1 = "pqwertyuio";
    r2 = ";asdfghjkl";
    r3 = "/zxcvbnm,.";
  } else {
    r1 = "wertyuiopq";
    r2 = "sdfghjkl;a";
    r3 = "xcvbnm,./z";
  }
  for (int i = 0; i < s.size(); i++) {
    parr parcito = instring(s[i], rr1);
    if (parcito.inside) {
      cout << r1[parcito.position];
    } else {
      parcito = instring(s[i], rr2);
      if (parcito.inside) {
        cout << r2[parcito.position];
      } else {
        parcito = instring(s[i], rr3);
        if (parcito.inside) {
          cout << r3[parcito.position];
        }
      }
    }
  }
  return 0;
}
