#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 1e9;
long long powm(long long a, long long p, long long m) {
  long long r = 1 % m;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
int main() {
  char keyboard[] = "qwertyuiopasdfghjkl;zxcvbnm,./", dir[2], input[101];
  scanf("%s%s", dir, input);
  for (char *c = input; *c; ++c)
    for (int i = 0;; ++i)
      if (keyboard[i] == *c) {
        if (dir[0] == 'R')
          printf("%c", keyboard[i - 1]);
        else
          printf("%c", keyboard[i + 1]);
        break;
      }
  puts("");
  return 0;
}
