#include <bits/stdc++.h>
using namespace std;
int main() {
  string top = "qwertyuiop", mid = "asdfghjkl;", bottom = "zxcvbnm,./", s;
  char pos;
  cin >> pos;
  cin >> s;
  if (pos == 'L') {
    for (int i = 0; i < s.length(); i++) {
      for (int j = 9; j >= 0; j--) {
        if (s[i] == top[j]) {
          s[i] = top[j + 1];
        }
        if (s[i] == mid[j]) {
          s[i] = mid[j + 1];
        }
        if (s[i] == bottom[j]) {
          s[i] = bottom[j + 1];
        }
      }
    }
  } else {
    for (int x = 0; x < s.length(); x++) {
      for (int y = 0; y < 10; y++) {
        if (s[x] == top[y]) {
          s[x] = top[y - 1];
        } else if (s[x] == mid[y]) {
          s[x] = mid[y - 1];
        } else if (s[x] == bottom[y]) {
          s[x] = bottom[y - 1];
        }
      }
    }
  }
  cout << s;
}
