#include <bits/stdc++.h>
using namespace std;
string sn[4], s, ans;
char c;
int n, i;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> c;
  cin >> s;
  sn[1] = "qwertyuiop";
  sn[2] = "asdfghjkl;";
  sn[3] = "zxcvbnm,./";
  if (c == 'L')
    n = 1;
  else
    n = -1;
  for (i = 0; i < s.size(); i++)
    if (sn[1].find(s[i]) != string::npos)
      ans += sn[1][sn[1].find(s[i]) + n];
    else if (sn[2].find(s[i]) != string::npos)
      ans += sn[2][sn[2].find(s[i]) + n];
    else
      ans += sn[3][sn[3].find(s[i]) + n];
  cout << ans << '\n';
  return 0;
}
