#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[] = "qwertyuiopasdfghjkl;zxcvbnm,./";
  char b;
  cin >> b;
  string c;
  cin >> c;
  if (b == 'R') {
    for (int i = 0; c[i] != '\0'; i++) {
      for (int j = 0; a[j] != '\0'; j++) {
        if (a[j] == c[i]) c[i] = a[j - 1];
      }
    }
  } else {
    for (int i = 0; c[i] != '\0'; i++) {
      for (int j = 29; j >= 0; j--) {
        if (a[j] == c[i]) c[i] = a[j + 1];
      }
    }
  }
  cout << c;
}
