#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  char N;
  char str[100];
  char up[10] = {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'};
  char ho[10] = {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'};
  char lo[10] = {'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/'};
  cin >> N;
  cin >> str;
  if (N == 'R') {
    for (int counter = 0; str[counter] != '\0'; counter++) {
      for (int counter2 = 0; counter2 < 10; counter2++) {
        if (str[counter] == up[counter2]) cout << up[counter2 - 1];
        if (str[counter] == ho[counter2]) cout << ho[counter2 - 1];
        if (str[counter] == lo[counter2]) cout << lo[counter2 - 1];
      }
    }
  }
  if (N == 'L') {
    for (int counter = 0; str[counter] != '\0'; counter++) {
      for (int counter2 = 0; counter2 < 10; counter2++) {
        if (str[counter] == up[counter2]) cout << up[counter2 + 1];
        if (str[counter] == ho[counter2]) cout << ho[counter2 + 1];
        if (str[counter] == lo[counter2]) cout << lo[counter2 + 1];
      }
    }
  }
  return 0;
}
