#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j;
  char n;
  cin >> n;
  string s = "qwertyuiopasdfghjkl;zxcvbnm,./", a;
  cin >> a;
  if (n == 'R') {
    for (i = 0; i < a.length(); i++)
      for (j = 0; j < 30; j++)
        if (a[i] == s[j]) {
          cout << s[j - 1];
          break;
        }
  } else {
    for (i = 0; i < a.length(); i++)
      for (j = 0; j < 30; j++)
        if (a[i] == s[j]) {
          cout << s[j + 1];
          break;
        }
  }
}
