#include <bits/stdc++.h>
using namespace std;
int main() {
  string kl1 = "qwertyuiopasdfghjkl;zxcvbnm,./";
  string side;
  string input;
  cin >> side >> input;
  if (side == "L") {
    for (int i = 0; i < input.length(); i++) {
      for (int j = kl1.length(); j >= 0; j--) {
        if (input[i] != 'p' && input[i] != ';' && input[i] != '/' &&
            input[i] == kl1[j]) {
          input[i] = kl1[j + 1];
        }
      }
    }
  } else if (side == "R") {
    for (int i = 0; i < input.length(); i++) {
      for (int j = 0; j < kl1.length(); j++) {
        if (input[i] != 'a' && input[i] != 'q' && input[i] != 'z' &&
            input[i] == kl1[j]) {
          input[i] = kl1[j - 1];
        }
      }
    }
  }
  cout << input;
}
