#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int main() {
  string s1 = "qwertyuiopasdfghjkl;zxcvbnm,./";
  string s;
  cin >> s;
  int ind = 0;
  if (s == "R") {
    ind--;
  } else
    ind++;
  string str;
  cin >> str;
  for (long long i = 0; i < (int)str.length(); i++)
    cout << s1[find((s1).begin(), (s1).end(), str[i]) - s1.begin() + ind];
  return 0;
}
