#include <bits/stdc++.h>
using namespace std;
long long in(string s1, char c) {
  for (int i = 0; i < (int)s1.length(); i++) {
    if (s1[i] == c) {
      return i;
    }
  }
}
void result() {
  char c;
  cin >> c;
  string s;
  cin >> s;
  string s1;
  s1.push_back('q'), s1.push_back('w'), s1.push_back('e'), s1.push_back('r'),
      s1.push_back('t'), s1.push_back('y'), s1.push_back('u'),
      s1.push_back('i'), s1.push_back('o'), s1.push_back('p');
  s1.push_back('a'), s1.push_back('s'), s1.push_back('d'), s1.push_back('f'),
      s1.push_back('g'), s1.push_back('h'), s1.push_back('j'),
      s1.push_back('k'), s1.push_back('l'), s1.push_back(';');
  s1.push_back('z'), s1.push_back('x'), s1.push_back('c'), s1.push_back('v'),
      s1.push_back('b'), s1.push_back('n'), s1.push_back('m'),
      s1.push_back(','), s1.push_back('.'), s1.push_back('/');
  if (c == 'R') {
    for (int i = 0; i < (int)s.length(); i++) {
      long long index = in(s1, s[i]);
      cout << s1[index - 1];
    }
  } else {
    for (int i = 0; i < (int)s.length(); i++) {
      long long index = in(s1, s[i]);
      cout << s1[index + 1];
    }
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  result();
  return 0;
}
