#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s[3] = {"qwertyuiop", "asdfghjkl;", "zxcvbnm,./"};
  char ch;
  cin >> ch;
  string in;
  cin >> in;
  map<char, char> m;
  if (ch == 'R') {
    for (int i = 1; i < 10; i++) {
      m[s[0][i]] = s[0][i - 1];
      m[s[1][i]] = s[1][i - 1];
      m[s[2][i]] = s[2][i - 1];
    }
  } else {
    for (int i = 0; i < 9; i++) {
      m[s[0][i]] = s[0][i + 1];
      m[s[1][i]] = s[1][i + 1];
      m[s[2][i]] = s[2][i + 1];
    }
  }
  int n = in.size();
  for (int i = 0; i < n; i++) {
    char h = m[in[i]];
    cout << h;
  }
  return 0;
}
