#include <bits/stdc++.h>
using namespace std;
int main() {
  char lookup[30] = {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p',
                     'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';',
                     'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/'};
  char a;
  vector<char> ch;
  string s;
  cin >> a >> s;
  for (long long i = 0; i < s.length(); i++) {
    char temp = s[i];
    long long count = 0;
    for (long long j = 0; j < 30; j++) {
      if (temp == lookup[j]) {
        count++;
        break;
      } else {
        count++;
      }
    }
    if (a == 'R') {
      ch.push_back(lookup[count - 2]);
    } else if (a == 'L') {
      ch.push_back(lookup[count]);
    }
  }
  for (long long i = 0; i < ch.size(); i++) {
    cout << ch[i];
  }
  cout << endl;
  return 0;
}
