#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  string s, str, str2;
  str2 = "qwertyuiopasdfghjkl;zxcvbnm,./";
  long long i = 0;
  cin >> s;
  cin >> str;
  while (i < str.size()) {
    long long j = 0;
    while (j < str2.size()) {
      if (str[i] == str2[j] && s == "R") {
        cout << str2[j - 1];
        break;
      } else if (str[i] == str2[j] && s == "L") {
        cout << str2[j + 1];
        break;
      }
      j++;
    }
    i++;
  }
  return 0;
}
