#include <bits/stdc++.h>
const int MAXN = (int)1e5 + 5;
const int MODN = (int)1e9 + 7;
int inf = 0x3f3f3f3f;
using namespace std;
char st[MAXN];
char str[MAXN];
int num[MAXN];
int a[MAXN];
int f(char c, char lr) {
  char s[] = "qwertyuiopasdfghjkl;zxcvbnm,./";
  int pos = -1;
  int len = strlen(s);
  for (int i = 0; i < len; i++) {
    if (s[i] == c) pos = i;
  }
  if (lr == 'L')
    return s[pos + 1];
  else
    return s[pos - 1];
}
int main() {
  int n, m;
  while (scanf("%s", st) != EOF) {
    scanf("%s", str);
    for (int i = 0; str[i] != '\0'; i++) {
      printf("%c", f(str[i], st[0]));
    }
    printf("\n");
  }
}
