#include <bits/stdc++.h>
using namespace std;
int main() {
  string shift;
  cin >> shift;
  string message;
  cin >> message;
  string result;
  string keyboard = "qwertyuiopasdfghjkl;zxcvbnm,./";
  for (char& c : message) {
    int index = keyboard.find(c);
    result += shift.compare("L") == 0 ? keyboard.at(index + 1)
                                      : keyboard.at(index - 1);
  }
  cout << result << "\n";
  return 0;
}
