#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    char dir;
    string s;
    cin >> dir >> s;
    vector<string> rows = {"qwertyuiop", "asdfghjkl;", "zxcvbnm,./"};
    for (char c : s)
        for (auto row : rows) {
            auto p = row.find(c);
            if (p != string::npos)
                cout << row[p + (dir == 'R' ? -1 : 1)];
        }
    cout << '\n';
}
