#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string given = "qwertyuiopasdfghjkl;zxcvbnm,./";
  char dir;
  cin >> dir;
  string str;
  cin >> str;
  if (dir == 'R') {
    for (int i = 0; str[i] != '\0'; i++) {
      int j;
      for (j = 0; given[j] != str[i]; j++) {
        continue;
      }
      if (j == 0)
        cout << given[given.length() - 1];
      else
        cout << given[j - 1];
    }
  } else {
    for (int i = 0; str[i] != '\0'; i++) {
      int j;
      for (j = 0; given[j] != str[i]; j++) {
        continue;
      }
      if (j == given.length() - 1)
        cout << given[0];
      else
        cout << given[j + 1];
    }
  }
}
