#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  char c;
  cin >> c;
  map<char, char> mp;
  if (c == 'L') {
    mp['q'] = 'w';
    mp['w'] = 'e';
    mp['e'] = 'r';
    mp['r'] = 't';
    mp['t'] = 'y';
    mp['y'] = 'u';
    mp['u'] = 'i';
    mp['i'] = 'o';
    mp['o'] = 'p';
    mp['a'] = 's';
    mp['s'] = 'd';
    mp['d'] = 'f';
    mp['f'] = 'g';
    mp['g'] = 'h';
    mp['h'] = 'j';
    mp['j'] = 'k';
    mp['k'] = 'l';
    mp['l'] = ';';
    mp['z'] = 'x';
    mp['x'] = 'c';
    mp['c'] = 'v';
    mp['v'] = 'b';
    mp['b'] = 'n';
    mp['n'] = 'm';
    mp['m'] = ',';
    mp[','] = '.';
    mp['.'] = '/';
  }
  if (c == 'R') {
    mp['w'] = 'q';
    mp['e'] = 'w';
    mp['r'] = 'e';
    mp['t'] = 'r';
    mp['y'] = 't';
    mp['u'] = 'y';
    mp['i'] = 'u';
    mp['o'] = 'i';
    mp['p'] = 'o';
    mp['s'] = 'a';
    mp['d'] = 's';
    mp['f'] = 'd';
    mp['g'] = 'f';
    mp['h'] = 'g';
    mp['j'] = 'h';
    mp['k'] = 'j';
    mp['l'] = 'k';
    mp[';'] = 'l';
    mp['x'] = 'z';
    mp['c'] = 'x';
    mp['v'] = 'c';
    mp['b'] = 'v';
    mp['n'] = 'b';
    mp['m'] = 'n';
    mp[','] = 'm';
    mp['.'] = ',';
    mp['/'] = '.';
  }
  string s;
  cin >> s;
  string ans = "";
  for (int i = 0; i < s.size(); i++) {
    ans += mp[s[i]];
  }
  cout << ans << "\n";
  return 0;
}
