#include <bits/stdc++.h>
using namespace std;
int main() {
  string sequence, keyboard, x;
  keyboard = "qwertyuiop[]asdfghjkl;'zxcvbnm,./";
  char direction;
  cin >> direction;
  cin >> sequence;
  if (direction == 'R') {
    for (int i = 0; i < sequence.length(); i++) {
      for (int j = 0; j < keyboard.length(); j++)
        if (sequence.at(i) == keyboard.at(j))
          sequence.at(i) = keyboard.at(j - 1);
    }
  } else if (direction == 'L') {
    for (int i = 0; i < sequence.length(); i++) {
      for (int j = 0; j < keyboard.length() - 1; j++)
        if (sequence.at(i) == keyboard.at(j)) {
          sequence.at(i) = keyboard.at(j + 1);
          j = 100;
        }
    }
  }
  cout << sequence << endl;
  return 0;
}
