#include <bits/stdc++.h>
using namespace std;
long long primes[100000];
long long sz;
bool ifprime(long long x) {
  for (long long i = 0; i < sz && primes[i] * primes[i] <= x; ++i) {
    if (x % primes[i] == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  string s = "qwertyuiopasdfghjkl;zxcvbnm,./";
  char c;
  string x;
  cin >> c;
  cin >> x;
  if (c == 'L') {
    int i = 0;
    while (x[i]) {
      int t = s.find(x[i]);
      cout << s[t + 1];
      ++i;
    }
  } else {
    int i = 0;
    while (x[i]) {
      int t = s.find(x[i]);
      cout << s[t - 1];
      ++i;
    }
  }
}
