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