#include <bits/stdc++.h>
using namespace std;
char keyboard[] = {'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', ',', '.', '/'};
int found(char a) {
  for (int i = 0;; i++)
    if (a == keyboard[i]) return i;
}
int main() {
  char orientation;
  cin >> orientation;
  int x;
  if (orientation == 'R')
    x = -1;
  else
    x = 1;
  string in;
  cin >> in;
  for (int i = 0, sz = in.size(); i < sz; i++)
    in[i] = keyboard[found(in[i]) + x];
  cout << in << '\n';
  return 0;
}
