#include <bits/stdc++.h>
using namespace std;
void printArray(long long start, long long end, int arr[]) {
  for (long long i = start; i < end; i++) cout << arr[i] << " ";
  cout << "\n";
}
void printVector(long long start, long long end, vector<int> vec) {
  for (long long i = start; i < end; i++) cout << vec[i] << " ";
  cout << "\n";
}
long long nextPerfectSquare(long long N) {
  long long nextN = floor(sqrt(N)) + 1;
  if (sqrt(N) == floor(sqrt(N))) nextN--;
  return nextN * nextN;
}
void solve() {
  char dir;
  int i;
  cin >> dir;
  string str, key = "qwertyuiopasdfghjkl;zxcvbnm,./";
  cin >> str;
  for (i = 0; i < str.size(); i++) {
    char ch = str[i];
    for (int j = 0; j < key.size(); j++) {
      if (ch == key[j] && dir == 'R') {
        cout << key[j - 1];
        break;
      }
      if (ch == key[j] && dir == 'L') {
        cout << key[j + 1];
        break;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
