#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  char d, kbd[] = "qwertyuiopasdfghjkl;zxcvbnm,./", msg[102];
  cin >> d >> msg;
  if (d == 'L')
    d = 1;
  else
    d = -1;
  for (int i = 0; msg[i] != 0; i++) {
    int j = 0;
    for (; msg[i] != kbd[j];) j++;
    msg[i] = kbd[j + d];
  }
  cout << msg;
  return 0;
}
