Our good friend Mole is trying to code a big message. He is typing on an unusual keyboard with characters arranged in following way:

qwertyuiop

asdfghjkl;

zxcvbnm,./



Unfortunately Mole is blind, so sometimes it is problem for him to put his hands accurately. He accidentally moved both his hands with one position to the left or to the right. That means that now he presses not a button he wants, but one neighboring button (left or right, as specified in input).

We have a sequence of characters he has typed and we want to find the original message.


-----Input-----

First line of the input contains one letter describing direction of shifting ('L' or 'R' respectively for left or right).

Second line contains a sequence of characters written by Mole. The size of this sequence will be no more than 100. Sequence contains only symbols that appear on Mole's keyboard. It doesn't contain spaces as there is no space on Mole's keyboard.

It is guaranteed that even though Mole hands are moved, he is still pressing buttons on keyboard and not hitting outside it.


-----Output-----

Print a line that contains the original message.


-----Examples-----
Input
R
s;;upimrrfod;pbr

Output
allyouneedislove

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
direction = input()
l1 = list(input())
l2 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if direction == 'R':
	for i in l1:
		print(l2[l2.index(i) - 1], end='')
else:
	for i in l1:
		print(l2[l2.index(i) + 1], end='')


direction = input()
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
mapping = {}
for i in range(len(keyboard)):
	for j in range(1, len(keyboard[i])):
		if direction == 'L':
			mapping[keyboard[i][j - 1]] = keyboard[i][j]
		else:
			mapping[keyboard[i][j]] = keyboard[i][j - 1]
print(''.join([mapping[c] for c in input()]))


q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
s = input()
for i in s:
	a = q.index(i)
	if n == 'R':
		print(q[a - 1], end='')
	else:
		print(q[a + 1], end='')


d = input()
s = input()
str1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
nstr = ''
if d == 'R':
	for i in s:
		for j in range(0, len(str1)):
			if i == str1[j]:
				nstr += str1[j - 1]
if d == 'L':
	for i in s:
		for j in range(0, len(str1)):
			if i == str1[j]:
				nstr += str1[j + 1]
print(nstr)


(a, b) = ('qwertyuiopasdfghjkl;zxcvbnm,./', input())
print(''.join((a[a.index(i) + [-1, 1][b == 'L']] for i in input())))


(s, d, r) = ('qwertyuiopasdfghjkl;zxcvbnm,./', input(), '')
for i in input():
	if d == 'R':
		r += s[s.index(i) - 1]
	else:
		r += s[s.index(i) + 1]
print(r)


keyboard = list('qwertyuiopasdfghjkl;zxcvbnm,./')
move = input()
letter = list(input())
output = ''
if move == 'R':
	for i in letter:
		output = output + keyboard[keyboard.index(i) - 1]
else:
	for i in letter:
		output = output + keyboard[keyboard.index(i) + 1]
print(output)


p = input()
s = input()
a = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
s1 = ''
for i in range(len(s)):
	k = a.index(s[i])
	if p == 'R':
		s1 += a[k - 1]
	elif p == 'L':
		s1 += a[k + 1]
print(s1)


R = {'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
L = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/'}

def split_str(s):
	return [ch for ch in s]
LorR = input()
s = input()
s = split_str(s)
res = []
if LorR == 'R':
	for i in s:
		res.append(R[i])
	print(''.join(res))
elif LorR == 'L':
	for i in s:
		res.append(L[i])
	print(''.join(res))


x = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
arr = input()
if x == 'R':
	for i in arr:
		print(key[key.index(i) - 1], end='')
else:
	for i in arr:
		print(key[key.index(i) + 1], end='')


(shifted, sentence) = (input(), input())
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
output = ''
for i in sentence:
	if shifted == 'R':
		output += keyboard[keyboard.index(i) - 1]
	else:
		output += keyboard[keyboard.index(i) + 1]
print(output)


s1 = list('qwertyuiop')
s2 = list('asdfghjkl;')
s3 = list('zxcvbnm,./')
n = 0
if input() == 'R':
	n = -1
else:
	n = 1
s = list(input())
for i in range(len(s)):
	if s1.count(s[i]) > 0:
		s[i] = s1[s1.index(s[i]) + n]
	if s2.count(s[i]) > 0:
		s[i] = s2[s2.index(s[i]) + n]
	if s3.count(s[i]) > 0:
		s[i] = s3[s3.index(s[i]) + n]
print(''.join(s))


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = -2 * int(input() == 'R') + 1
for x in input():
	print(k[k.find(x) + a], end='')


kybrd = 'qwertyuiopasdfghjkl;zxcvbnm,./'
sft = input()
inn = input()
fnl = ''
if sft == 'R':
	for each in inn:
		fnl += kybrd[kybrd.index(each) - 1]
else:
	for each in inn:
		fnl += kybrd[kybrd.index(each) + 1]
print(fnl)


KeyBoard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
shift = input()
s = input()
ans = ''
for ch in s:
	for i in range(0, len(KeyBoard)):
		for j in range(0, len(KeyBoard[i])):
			if KeyBoard[i][j] == ch:
				if shift == 'L':
					ans += KeyBoard[i][j + 1]
				else:
					ans += KeyBoard[i][j - 1]
print(ans)


lines = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
direction = input()
if direction == 'L':
	direction = 1
else:
	direction = -1
s = input()
result = []
for l in s:
	result.append(lines[lines.index(l) + direction])
print(''.join(result))


kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
shift = -1 if direction == 'R' else 1
message = input()
ans = [kb[kb.index(c) + shift] for c in message]
print(''.join(ans))


N = input()
S = input()
E = []
char = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if N == 'R':
	for i in S:
		a = char[char.index(i) - 1]
		E.append(a)
else:
	for i in S:
		a = char[char.index(i) + 1]
		E.append(a)
print(''.join(E))


def create_keyboard():
	keyboard = {}
	chars = '0qwertyuiop0asdfghjkl;0zxcvbnm,./0'
	for i in range(1, len(chars) - 1):
		keyboard[chars[i]] = (chars[i - 1], chars[i + 1])
	return keyboard

def solve():
	keyboard = create_keyboard()
	direc = 0 if input() == 'R' else 1
	new_s = []
	for i in input():
		new_s.append(keyboard[i][direc])
	print(''.join(new_s))
solve()


direct = input()
word = input()
s = []
a = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.']
b = ['w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if direct == 'R':
	for i in word:
		s.append(a[b.index(i)])
else:
	for i in word:
		s.append(b[a.index(i)])
print(''.join(s))


a = input()
b = list(input())
z = list('qwertyuiopasdfghjkl;zxcvbnm,./')
V = []
if a == 'R':
	for i in b:
		A = z.index(i)
		V.append(z[A - 1])
else:
	for i in b:
		A = z.index(i)
		V.append(z[A + 1])
print(''.join(V))


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
if input() == 'R':
	for char in input():
		if char in b:
			print(b[b.index(char) - 1], end='')
		elif char in a:
			print(a[a.index(char) - 1], end='')
		else:
			print(c[c.index(char) - 1], end='')
else:
	for char in input():
		if char in b:
			print(b[b.index(char) + 1], end='')
		elif char in a:
			print(a[a.index(char) + 1], end='')
		else:
			print(c[c.index(char) + 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
s = input()
if n == 'R':
	for i in range(len(s)):
		if s[i] in a:
			print(a[a.index(s[i]) - 1], end='')
else:
	for i in range(len(s)):
		if s[i] in a:
			print(a[a.index(s[i]) + 1], end='')


import sys
import os
r = {'q': 'q', 'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 'a': 'a', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'z': 'z', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
l = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'p': 'p', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', ';': ';', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/', '/': '/'}
letter = input()
word = ''
string = sys.stdin.readline()
if letter == 'R':
	for x in string:
		str1 = str(r.get(x))
		word = word + str1
else:
	for x in string:
		str1 = str(l.get(x))
		word = word + str1
print(word[:-4])


lr = input()
s = input()
str = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
for i in s:
	a = str.index(i)
	if lr == 'R':
		print(str[a - 1], end='')
	else:
		print(str[a + 1], end='')


d = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
txt = input()
for i in txt:
	if d == 'R':
		print(keyboard[keyboard.index(i) - 1], end='')
	else:
		print(keyboard[keyboard.index(i) + 1], end='')


alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
dir = input()
if dir == 'R':
	offset = -1
else:
	offset = 1
text = input()
for i in text:
	print(alpha[alpha.index(i) + offset], end='')


s = list('qwertyuiopasdfghjkl;zxcvbnm,./')
a = input()
x = input()

def f(x, y):
	for i in range(len(x)):
		print(s[s.index(x[i]) + y], end='')
f(x, 1) if a == 'L' else f(x, -1)


klavesnica = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
pohyb = input()
sprava = input()
if pohyb == 'L':
	shift = 1
elif pohyb == 'R':
	shift = -1
skutocna_sprava = ''
for znak in sprava:
	for riadok in klavesnica:
		pozicia = riadok.find(znak)
		if pozicia != -1:
			skutocna_sprava += riadok[pozicia + shift]
			break
print(skutocna_sprava)


a = input()
b = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
s = ''
if a == 'R':
	for x in b:
		if s1.__contains__(x):
			z = s1.index(x)
			z -= 1
			s += s1[z]
		elif s2.__contains__(x):
			z = s2.index(x)
			z -= 1
			s += s2[z]
		elif s3.__contains__(x):
			z = s3.index(x)
			z -= 1
			s += s3[z]
else:
	for x in b:
		if s1.__contains__(x):
			z = s1.index(x)
			z += 1
			s += s1[z]
		elif s2.__contains__(x):
			z = s2.index(x)
			z += 1
			s += s2[z]
		elif s3.__contains__(x):
			z = s3.index(x)
			z += 1
			s += s3[z]
print(s)


a = input()
b = list(input())
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(b)):
	if a == 'L':
		b[i] = c[c.index(b[i]) + 1]
	else:
		b[i] = c[c.index(b[i]) - 1]
print(''.join(b))


direction = input()
word = input()
finishword = ''
k = 0
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if direction == 'R':
	ind = -1
else:
	ind = 1
for i in word:
	finishword += keyboard[keyboard.find(i) + ind]
print(finishword)


n = input()
string = list(input())
string_ref = list('qwertyuiopasdfghjkl;zxcvbnm,./')
for i in range(0, len(string)):
	j = 0
	while j < len(string_ref):
		if string[i] == string_ref[j]:
			if n == 'L':
				string[i] = string_ref[j + 1]
			else:
				string[i] = string_ref[j - 1]
			break
		else:
			j += 1
output = ''
for i in range(len(string)):
	output += string[i]
print(output)


offset = -1 if input() == 'R' else 1
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
print(''.join((keyboard[keyboard.index(ch) + offset] for ch in input())))


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
s = input()
q = ''
if n == 'R':
	for i in s:
		q += a[a.index(i) - 1]
if n == 'L':
	for i in s:
		q += a[a.index(i) + 1]
print(q)


array = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
R_L = input()
text = input()
result = ''
if R_L == 'R':
	for x in text:
		result += array[array.index(x) - 1]
else:
	for x in text:
		result += array[array.index(x) + 1]
print(result)


move = input()
shift = 0
if move == 'R':
	shift = 1
else:
	shift = -1
A = list('qwertyuiop')
B = list('asdfghjkl;')
C = list('zxcvbnm,./')
val = list(input())
res = []
for i in range(len(val)):
	if val[i] in A:
		res.append(A[A.index(val[i]) - shift])
	elif val[i] in B:
		res.append(B[B.index(val[i]) - shift])
	elif val[i] in C:
		res.append(C[C.index(val[i]) - shift])
print(''.join(res))


l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
m = {}
flag = input()
s = input()
if flag == 'R':
	for i in range(1, len(l1)):
		m[l1[i]] = l1[i - 1]
	for i in range(1, len(l2)):
		m[l2[i]] = l2[i - 1]
	for i in range(1, len(l3)):
		m[l3[i]] = l3[i - 1]
else:
	for i in range(len(l1) - 1):
		m[l1[i]] = l1[i + 1]
	for i in range(len(l2) - 1):
		m[l2[i]] = l2[i + 1]
	for i in range(len(l3) - 1):
		m[l3[i]] = l3[i + 1]
for ch in s:
	print(m[ch], end='')
print('')


a = input()
st = list(input())
r1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
r2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
r3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if a == 'R':
	for i in range(len(st)):
		for j in range(10):
			if r1[j] == st[i]:
				st[i] = r1[j - 1]
				break
			elif r2[j] == st[i]:
				st[i] = r2[j - 1]
				break
			elif r3[j] == st[i]:
				st[i] = r3[j - 1]
				break
else:
	for i in range(len(st)):
		for j in range(10):
			if r1[j] == st[i]:
				st[i] = r1[j + 1]
				break
			elif r2[j] == st[i]:
				st[i] = r2[j + 1]
				break
			elif r3[j] == st[i]:
				st[i] = r3[j + 1]
				break
print(''.join(st))


d = input()
text = input()
row1 = list('qwertyuiop')
row2 = list('asdfghjkl;')
row3 = list('zxcvbnm,./')
for i in range(len(text)):
	if text[i] in row1:
		if d == 'R':
			print(row1[row1.index(text[i]) - 1], end='')
		else:
			print(row1[row1.index(text[i]) + 1], end='')
	if text[i] in row2:
		if d == 'R':
			print(row2[row2.index(text[i]) - 1], end='')
		else:
			print(row2[row2.index(text[i]) + 1], end='')
	if text[i] in row3:
		if d == 'R':
			print(row3[row3.index(text[i]) - 1], end='')
		else:
			print(row3[row3.index(text[i]) + 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
storona = input()
kod = list(input())
b = 0
for i in range(len(kod)):
	if storona == 'R':
		kod[i] = a[a.index(kod[i]) - 1]
	if storona == 'L':
		kod[i] = a[a.index(kod[i]) + 1]
print(''.join(kod))


x = input()
y = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
output = ''
for i in range(len(y)):
	for j in range(len(keyboard)):
		if y[i] == keyboard[j]:
			if x == 'R':
				output += keyboard[j - 1]
			else:
				output += keyboard[j + 1]
print(output)


def checkline(letter, line, shifting):
	if shifting == 'R':
		actual = line[line.find(letter) - 1]
	elif shifting == 'L':
		actual = line[line.find(letter) + 1]
	return actual
lines = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
shifting = input()
entry = input()
actual = ''
for letter in entry:
	for line in lines:
		if letter in line:
			actual = actual + checkline(letter, line, shifting)
print(actual)


shift = str(input())
s = str(input())
n = len(s)
buff1 = 'qwertyuiop'
buff2 = 'asdfghjkl;'
buff3 = 'zxcvbnm,./'
output = ''
for i in range(n):
	if shift == 'L':
		if buff1.find(s[i]) >= 0:
			j = buff1.find(s[i])
			output = output + buff1[j + 1]
		elif buff2.find(s[i]) >= 0:
			j = buff2.find(s[i])
			output = output + buff2[j + 1]
		else:
			j = buff3.find(s[i])
			output = output + buff3[j + 1]
	elif buff1.find(s[i]) >= 0:
		j = buff1.find(s[i])
		output = output + buff1[j - 1]
	elif buff2.find(s[i]) >= 0:
		j = buff2.find(s[i])
		output = output + buff2[j - 1]
	else:
		j = buff3.find(s[i])
		output = output + buff3[j - 1]
print(output)


kb = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
shift = input()
s = input()
for c in s:
	for line in kb:
		if c in line:
			print(line[line.index(c) + [1, -1][shift == 'R']], end='')


x = input()
y = input()
c = ''
z = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in y:
	if x == 'R':
		c += z[z.index(i) - 1]
	elif z.index(i) == len(z) - 1:
		c += z[z.index(i) - 1]
	else:
		c += z[z.index(i) + 1]
print(c)


per = input()
kata = input()
arr = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'", 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if per == 'R':
	for i in range(len(kata)):
		for j in range(len(arr)):
			if kata[i] == arr[j]:
				print(arr[j - 1], end='')
else:
	for i in range(len(kata)):
		for j in range(len(arr)):
			if kata[i] == arr[j]:
				print(arr[j + 1], end='')


x = list('qwertyuiop')
b = list('asdfghjkl;')
c = list('zxcvbnm,./')
n = input()
if n == 'R':
	a = -1
else:
	a = 1
s = list(input())
for i in range(len(s)):
	if a == 1 and (s[i] == x[-1] or s[i] == b[-1] or s[i] == c[-1]):
		continue
	elif a == -1 and (s[i] == x[0] or s[i] == b[0] or s[i] == c[0]):
		continue
	if s[i] in x:
		s[i] = x[x.index(s[i]) + a]
	elif s[i] in b:
		s[i] = b[b.index(s[i]) + a]
	elif s[i] in c:
		s[i] = c[c.index(s[i]) + a]
print(''.join(s))


m = input()
s = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
if m == 'R':
	for i in range(len(s)):
		res += k[k.find(s[i]) - 1]
else:
	for i in range(len(s)):
		res += k[k.find(s[i]) + 1]
print(res)


direction = input()
word = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in word:
	if direction == 'R':
		print(keyboard[keyboard.index(i) - 1], end='')
	else:
		print(keyboard[keyboard.index(i) + 1], end='')


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
a = input()
s = input()
r = ''
if a == 'R':
	a = -1
else:
	a = 1
for i in s:
	if i in s1:
		r += s1[s1.index(i) + a]
	elif i in s2:
		r += s2[s2.index(i) + a]
	elif i in s3:
		r += s3[s3.index(i) + a]
print(r)


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
y = input()
x = input()
if y == 'L':
	for i in x:
		p = k[k.index(i) + 1]
		print(p, end='')
if y == 'R':
	for i in x:
		p = k[k.index(i) - 1]
		print(p, end='')


(ans, s) = ('', 'qwertyuiopasdfghjkl;zxcvbnm,./')
(d, i) = (input(), input())
if d == 'R':
	for x in i:
		ans += s[s.index(x) - 1]
else:
	for x in i:
		ans += s[s.index(x) + 1]
print(ans)


from sys import stdin
d = {'L': {'t': 'y', 'n': 'm', 'e': 'r', 's': 'd', 'a': 's', 'y': 'u', 'u': 'i', ',': '.', 'j': 'k', 'g': 'h', 'v': 'b', 'x': 'c', 'f': 'g', 'l': ';', 'r': 't', 'c': 'v', 'z': 'x', 'q': 'w', 'k': 'l', 'h': 'j', '.': '/', 'd': 'f', 'w': 'e', 'b': 'n', 'm': ',', 'o': 'p', 'i': 'o'}, 'R': {'t': 'r', 'n': 'b', 'e': 'w', 's': 'a', 'y': 't', 'u': 'y', ',': 'm', 'j': 'h', '/': '.', 'g': 'f', 'v': 'c', 'f': 'd', 'l': 'k', 'r': 'e', 'c': 'x', 'x': 'z', 'k': 'j', 'h': 'g', ';': 'l', '.': ',', 'd': 's', 'w': 'q', 'b': 'v', 'm': 'n', 'p': 'o', 'o': 'i', 'i': 'u'}}[stdin.readline().strip()]
print(''.join(map(d.get, stdin.readline().strip())))


STR = list('qwertyuiopasdfghjkl;zxcvbnm,./')
way = input()
n = list(input())
if way == 'R':
	for i in range(len(n)):
		j = 0
		while n[i] != STR[j]:
			j += 1
		n[i] = STR[j - 1]
else:
	for i in range(len(n)):
		j = 0
		while n[i] != STR[j]:
			j += 1
		n[i] = STR[j + 1]
print(*n, sep='')


n = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
index_map = {c: keyboard.index(c) for c in keyboard}
s = input()
shift = -1 if n == 'R' else 1
ans = ''
for c in s:
	index = index_map.get(c) + shift
	ans += keyboard[index]
print(ans)


keys = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']

def solve(dirention, input):
	curr = []
	index = 0
	output = ''
	for i in input:
		if i in keys[0]:
			curr = keys[0]
		if i in keys[1]:
			curr = keys[1]
		if i in keys[2]:
			curr = keys[2]
		index = curr.index(i)
		if direction == 'L':
			output += curr[(index + 1) % 10]
		elif direction == 'R':
			if index - 1 == -1:
				index = 10
			output += curr[index - 1]
	return output
direction = input()
s = input()
print(solve(direction, s))


shift = input()
index_shift = -1 if shift == 'R' else 1
arr = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
text = input()
output = ''
for ch in text:
	for item in arr:
		index = item.find(ch)
		if index > -1:
			output += item[index + index_shift]
			break
print(output)


shift = input()
letters = input()
sequence = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for letter in letters:
	ind = sequence.index(letter)
	if shift == 'R':
		print(sequence[ind - 1], end='')
	else:
		print(sequence[ind + 1], end='')


n = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
s = input()
res = ''
for ch in s:
	if ch in s1:
		res += s1[s1.index(ch) + 1] if n == 'L' else s1[s1.index(ch) - 1]
	elif ch in s2:
		res += s2[s2.index(ch) + 1] if n == 'L' else s2[s2.index(ch) - 1]
	elif ch in s3:
		res += s3[s3.index(ch) + 1] if n == 'L' else s3[s3.index(ch) - 1]
print(res)


word = input()
keybord = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for l in input():
	print(keybord[keybord.index(l) + [1, -1][word == 'R']], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if input() == 'L':
	print(*map(lambda x: a[a.find(x) + 1], input()), sep='')
else:
	print(*map(lambda x: a[a.find(x) - 1], input()), sep='')


d = input()
s = input()
e = list(s)
f = []
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
for i in range(len(e)):
	if d == 'L':
		if e[i] in a:
			f.append(a[a.index(e[i]) + 1])
		elif e[i] in b:
			f.append(b[b.index(e[i]) + 1])
		elif e[i] in c:
			f.append(c[c.index(e[i]) + 1])
	elif d == 'R':
		if e[i] in a:
			f.append(a[a.index(e[i]) - 1])
		elif e[i] in b:
			f.append(b[b.index(e[i]) - 1])
		elif e[i] in c:
			f.append(c[c.index(e[i]) - 1])
print(''.join(f))


d = input()
s = input()
alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	for i in s:
		l = alpha.index(i)
		print(alpha[l - 1], end='')
else:
	for i in s:
		l = alpha.index(i)
		print(alpha[l + 1], end='')


n = input()
word = input()
up = 'qwertyuiop'
mid = 'asdfghjkl;'
bot = 'zxcvbnm,./'
if n == 'R':
	for ch in word:
		if ch in up:
			i = up.index(ch)
			print(up[i - 1], end='')
		elif ch in mid:
			i = mid.index(ch)
			print(mid[i - 1], end='')
		elif ch in bot:
			i = bot.index(ch)
			print(bot[i - 1], end='')
elif n == 'L':
	for ch in word:
		if ch in up:
			i = up.index(ch)
			print(up[i + 1], end='')
		elif ch in mid:
			i = mid.index(ch)
			print(mid[i + 1], end='')
		elif ch in bot:
			i = bot.index(ch)
			print(bot[i + 1], end='')


d = input()
string = input()
layout = '\nqwertyuiop\nasdfghjkl;\nzxcvbnm,./\n'
t = str.maketrans(layout, layout[1:] + layout[:1] if d == 'L' else layout[-1] + layout[:-1])
print(string.translate(t))


a = (-1, 1)[input() == 'L']
message = input()
keyboard = []
for i in 'qwertyuiopasdfghjkl;zxcvbnm,./':
	keyboard.append(i)
for i in range(len(message)):
	print(keyboard[a + keyboard.index(message[i])], end='')


n = input()
s = input()
if n == 'R':
	k = -1
else:
	k = 1
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
ans = ''
for i in s:
	if i in s1:
		ans += s1[s1.index(i) + k]
	elif i in s2:
		ans += s2[s2.index(i) + k]
	else:
		ans += s3[s3.index(i) + k]
print(ans)


ans = input()
L1 = [x for x in 'qwertyuiop']
L2 = [x for x in 'asdfghjkl;']
L3 = [x for x in 'zxcvbnm,./']
p = 1
for x in input():
	if ans == 'R':
		p = -1
	if x in L1:
		print(L1[L1.index(x) + p], end='')
	elif x in L2:
		print(L2[L2.index(x) + p], end='')
	else:
		print(L3[L3.index(x) + p], end='')


x = input()
st = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
y = ''
if x == 'R':
	for i in st:
		if i in a:
			for o in range(len(a)):
				if a[o] == i:
					y += a[o - 1]
		if i in b:
			for o in range(len(b)):
				if b[o] == i:
					y += b[o - 1]
		if i in c:
			for o in range(len(c)):
				if c[o] == i:
					y += c[o - 1]
if x == 'L':
	for i in st:
		if i in a:
			for o in range(len(a)):
				if a[o] == i:
					y += a[o + 1]
		if i in b:
			for o in range(len(b)):
				if b[o] == i:
					y += b[o + 1]
		if i in c:
			for o in range(len(c)):
				if c[o] == i:
					y += c[o + 1]
print(y)


s = input()
m = list(input())
a = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
if s == 'R':
	for i in range(len(m)):
		if m[i] in a[0]:
			x = a[0].index(m[i])
			m[i] = a[0][x - 1]
		elif m[i] in a[1]:
			x = a[1].index(m[i])
			m[i] = a[1][x - 1]
		elif m[i] in a[2]:
			x = a[2].index(m[i])
			m[i] = a[2][x - 1]
else:
	for i in range(len(m)):
		if m[i] in a[0]:
			x = a[0].index(m[i])
			m[i] = a[0][x + 1]
		elif m[i] in a[1]:
			x = a[1].index(m[i])
			m[i] = a[1][x + 1]
		elif m[i] in a[2]:
			x = a[2].index(m[i])
			m[i] = a[2][x + 1]
print(''.join(m))


let = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
s = input()
ans = ''
k = -1 if d == 'R' else 1
for i in range(len(s)):
	ans = ans + let[let.index(s[i]) + k]
print(ans)


r1 = 'qwertyuiop'
r2 = 'asdfghjkl;'
r3 = 'zxcvbnm,./'
dir = input()
sequence = input()
shift = ''
if dir == 'R':
	shift = -1
else:
	shift = 1
result = ''
for ch in sequence:
	if ch in r1:
		result += r1[r1.find(ch) + shift]
	elif ch in r2:
		result += r2[r2.find(ch) + shift]
	else:
		result += r3[r3.find(ch) + shift]
print(result)


key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = -1 if input() == 'R' else 1
print(''.join([key[key.find(x) + a] for x in input()]))


p = input()
m = input()
n = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if p == 'R':
	i = 0
	while i < len(m):
		j = -1
		while j > -len(n) or j == -len(n):
			if m[i] == n[j]:
				print(n[j - 1], end='')
			j = j - 1
		i = i + 1
else:
	i = 0
	while i < len(m):
		j = 0
		while j < len(n):
			if m[i] == n[j]:
				print(n[j + 1], end='')
			j = j + 1
		i = i + 1


ref = 'qwertyuiopasdfghjkl;zxcvbnm,./'
move = 1 if input() == 'L' else -1
data = input()
message = ''
for i in data:
	message += ref[ref.index(i) + move]
print(message)


first = 'qwertyuiop'
second = 'asdfghjkl;'
third = 'zxcvbnm,./'
new = ''
rorl = str(input())
mole = str(input())
if rorl == 'R':
	for x in mole:
		if x in first:
			i = first.find(x)
			y = first[i - 1]
			new = new + y
		if x in second:
			i = second.find(x)
			y = second[i - 1]
			new = new + y
		if x in third:
			i = third.find(x)
			y = third[i - 1]
			new = new + y
	print(new)
else:
	for x in mole:
		if x in first:
			i = first.find(x)
			y = first[i + 1]
			new = new + y
		if x in second:
			i = second.find(x)
			y = second[i + 1]
			new = new + y
		if x in third:
			i = third.find(x)
			y = third[i + 1]
			new = new + y
	print(new)


g = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
n = list(input())
if g == 'R':
	for i in range(len(n)):
		if n[i] in a:
			n[i] = a[a.index(n[i]) - 1]
		elif n[i] in b:
			n[i] = b[b.index(n[i]) - 1]
		else:
			n[i] = c[c.index(n[i]) - 1]
else:
	for i in range(len(n)):
		if n[i] in a:
			n[i] = a[a.index(n[i]) + 1]
		elif n[i] in b:
			n[i] = b[b.index(n[i]) + 1]
		else:
			n[i] = c[c.index(n[i]) + 1]
print(''.join(n[0:]))


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shifting = input()
shifting = -1 if shifting == 'R' else 1
typed = input()
for l in typed:
	print(keyboard[keyboard.index(l) + shifting], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = []
direction = input()
dupmsg = input()
if direction == 'R':
	for i in range(len(dupmsg)):
		if dupmsg[i] in s:
			a.append(s[s.index(dupmsg[i]) - 1])
	print(''.join(map(str, a)))
elif direction == 'L':
	for i in range(len(dupmsg)):
		if dupmsg[i] in s:
			a.append(s[s.index(dupmsg[i]) + 1])
	print(''.join(map(str, a)))


l = input()
st = input()
re = ''
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(0, len(st)):
	for j in range(0, len(s)):
		if l == 'R':
			if st[i] == s[j]:
				re += s[j - 1]
		if l == 'L':
			if st[i] == s[j]:
				re += s[j + 1]
print(re)


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
p = input()
s = [k[k.index(x) - 1] if n == 'R' else k[k.index(x) + 1] for x in p]
print(''.join(s))


letter_eq = dict()
letter_eq['q'] = 'w'
letter_eq['a'] = 's'
letter_eq['z'] = 'x'
letter_eq['w'] = 'e'
letter_eq['s'] = 'd'
letter_eq['x'] = 'c'
letter_eq['e'] = 'r'
letter_eq['d'] = 'f'
letter_eq['c'] = 'v'
letter_eq['r'] = 't'
letter_eq['f'] = 'g'
letter_eq['v'] = 'b'
letter_eq['t'] = 'y'
letter_eq['g'] = 'h'
letter_eq['b'] = 'n'
letter_eq['y'] = 'u'
letter_eq['h'] = 'j'
letter_eq['n'] = 'm'
letter_eq['u'] = 'i'
letter_eq['j'] = 'k'
letter_eq['m'] = ','
letter_eq['i'] = 'o'
letter_eq['k'] = 'l'
letter_eq[','] = '.'
letter_eq['o'] = 'p'
letter_eq['l'] = ';'
letter_eq['.'] = '/'
shift = input()
shifted_string = input()
if shift == 'L':
	newstr = ''
	for letter in shifted_string:
		newstr += letter_eq[letter]
if shift == 'R':
	newstr = ''
	for letter in shifted_string:
		for (key, value) in letter_eq.items():
			if value == letter:
				newstr += key
print(newstr)


keyboardF = 'qwertyuiop'
keyboardS = 'asdfghjkl;'
keyboardT = 'zxcvbnm,./'
shift = input()
msg = input()
org = []
if shift == 'R':
	for i in range(len(msg)):
		if msg[i] in keyboardF:
			org.append(keyboardF[keyboardF.index(msg[i]) - 1])
		elif msg[i] in keyboardS:
			org.append(keyboardS[keyboardS.index(msg[i]) - 1])
		else:
			org.append(keyboardT[keyboardT.index(msg[i]) - 1])
else:
	for i in range(len(msg)):
		if msg[i] in keyboardF:
			org.append(keyboardF[keyboardF.index(msg[i]) + 1])
		elif msg[i] in keyboardS:
			org.append(keyboardS[keyboardS.index(msg[i]) + 1])
		else:
			org.append(keyboardT[keyboardT.index(msg[i]) + 1])
print(''.join(org))


__author__ = 'myduomilia'
arr = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
(ch, s) = (input(), input())
for val in s:
	for a in arr:
		ind = a.find(val)
		if ind != -1:
			print(a[ind - 1] if ch == 'R' else a[ind + 1], end='')
			break


x = input()
s = input()
ans = ''
l = []
q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(q)):
	l.append(q[i])
for i in range(len(s)):
	a = q.index(s[i])
	if x == 'R':
		ans += q[a - 1]
	else:
		ans += q[a + 1]
print(ans)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
k = input()
error = 0
if k == 'R':
	error = -1
else:
	error = 1
s = input()
for c in s:
	if c in s1:
		t = s1.index(c)
		print(s1[t + error], end='')
	elif c in s2:
		t = s2.index(c)
		print(s2[t + error], end='')
	else:
		t = s3.index(c)
		print(s3[t + error], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s1 = input()
s2 = input()
ans = ''
if s1 == 'R':
	for i in range(len(s2)):
		ch = s2[i]
		for j in range(len(s)):
			if ch == s[j]:
				ans = ans + s[j - 1]
else:
	for i in range(len(s2)):
		ch = s2[i]
		for j in range(len(s)):
			if ch == s[j]:
				ans = ans + s[j + 1]
print(ans)


l = list('qwertyuiop asdfghjkl; zxcvbnm,./')
i = input()
s = list(input())
for j in range(len(s)):
	if i == 'R':
		a = l.index(s[j])
		print(l[a - 1], end='')
	else:
		a = l.index(s[j])
		print(l[a + 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k = [1, -1]['R' == input()]
[print(a[a.index(i) + k], end='') for i in input()]


ch = str(input())
code = str(input())
A = 'qwertyuiopasdfghjkl;zxcvbnm,./'
r = ''
for k in range(len(code)):
	e = A.index(code[k])
	if ch == 'R':
		r += A[e - 1]
	else:
		r += A[e + 1]
print(r)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
s = input()
if a == 'R':
	x = 1
else:
	x = -1
r = ''
for i in range(len(s)):
	r += keyboard[keyboard.index(s[i]) - x]
print(r)


c = input()
s = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
m = []
for i in s:
	j = k.find(i)
	if c == 'R':
		m.append(k[j - 1])
	else:
		m.append(k[j + 1])
mes = ''.join(m)
print(mes)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
n = ''
s = input()
l = input()
for i in l:
	if i in a and s == 'L':
		n += a[a.find(i) + 1]
	if i in a and s == 'R':
		n += a[a.find(i) - 1]
	if i in b and s == 'L':
		n += b[b.find(i) + 1]
	if i in b and s == 'R':
		n += b[b.find(i) - 1]
	if i in c and s == 'L':
		n += c[c.find(i) + 1]
	if i in c and s == 'R':
		n += c[c.find(i) - 1]
print(n)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
dir = input()
q = input()
ans = []
if dir == 'R':
	for i in q:
		if i in a:
			ans.append(a[a.index(i) - 1])
		if i in b:
			ans.append(b[b.index(i) - 1])
		if i in c:
			ans.append(c[c.index(i) - 1])
else:
	for i in q:
		if i in a:
			ans.append(a[a.index(i) + 1])
		if i in b:
			ans.append(b[b.index(i) + 1])
		if i in c:
			ans.append(c[c.index(i) + 1])
print(''.join(ans))


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if input() == 'R':
	d = -1
else:
	d = 1
s = input()
p = ''
for i in s:
	p += k[k.index(i) + d]
print(p)


import sys
input = sys.stdin.read()
(direction, string) = input.split()
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']

def modify(char):
	shift = +1 if direction == 'L' else -1
	for row in keyboard:
		if char in row:
			return row[row.find(char) + shift]
	else:
		print('Error:', char, shift)
		assert False
sys.stdout.write(''.join(map(modify, string)))


(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, dgraphs, mod) = (lambda : sorted(zz()), {}, 10 ** 9 + 7)
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
l1 = list('qwertyuiop')
l2 = list('asdfghjkl;')
l3 = list('zxcvbnm,./')
s = ''
d = z()
if d == 'R':
	p = -1
if d == 'L':
	p = 1
l = list(z())
for i in l:
	try:
		t = l1.index(i)
		s += l1[t + p]
	except:
		pass
	try:
		t = l2.index(i)
		s += l2[t + p]
	except:
		pass
	try:
		t = l3.index(i)
		s += l3[t + p]
	except:
		pass
print(s)


z = input()
x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
y = input()
if z == 'R':
	for ch in y:
		print(x[x.index(ch) - 1], end='')
else:
	for ch in y:
		print(x[x.index(ch) + 1], end='')


alph = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = {alph[i]: i for i in range(len(alph))}
d1 = input()
res = ''
for c in input():
	res += alph[d[c] + (-1 if d1 == 'R' else 1)]
print(res)


h1 = 'qwertyuiop'
h2 = 'asdfghjkl;'
h3 = 'zxcvbnm,./'
s1 = input().rstrip()
c1 = input().rstrip()
result = ''
for i in c1:
	if i in h1:
		if s1 == 'R':
			result += h1[h1.index(i) - 1]
		if s1 == 'L':
			result += h1[h1.index(i) + 1]
	if i in h2:
		if s1 == 'R':
			result += h2[h2.index(i) - 1]
		if s1 == 'L':
			result += h2[h2.index(i) + 1]
	if i in h3:
		if s1 == 'R':
			result += h3[h3.index(i) - 1]
		if s1 == 'L':
			result += h3[h3.index(i) + 1]
print(result)


line1 = list('qwertyuiop') * 2
line2 = list('asdfghjkl;') * 2
line3 = list('zxcvbnm,./') * 2
lines = [line1, line2, line3]
ans = ''
if input() == 'R':
	y = -1
else:
	y = 1

def change(x):
	for line in lines:
		if x in line:
			return line[line.index(x) + y]
for x in list(input()):
	ans += change(x)
print(ans)


a = input()
b = input()
keybord = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'R':
	for i in range(len(b)):
		print(keybord[keybord.find(b[i]) - 1], end='')
else:
	for i in range(len(b)):
		print(keybord[keybord.find(b[i]) + 1], end='')


import string
char = str(input())
str1 = str2 = []
str1 = list('qwertyuiopasdfghjkl;zxcvbnm,./')
str2 = list(str(input()))
for i in range(0, len(str2)):
	for j in range(0, len(str1)):
		if char == 'L':
			if str2[i] == str1[j]:
				str2[i] = str1[j + 1]
				break
		elif char == 'R':
			if str2[i] == str1[j]:
				str2[i] = str1[j - 1]
				break
str2 = ''.join(str2)
print(str(str2))


n = input()
x = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = ''
if n == 'R':
	for i in x:
		m = a.find(i)
		s += str(a[m - 1]) + ''
else:
	for i in x:
		m = a.find(i)
		s += str(a[m + 1]) + ''
print(s)


try:
	a = input()
	b = input()
	c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	e = ''
	if a == 'R':
		for i in b:
			d = c.index(i)
			e = e + c[d - 1]
	else:
		for i in b:
			d = c.index(i)
			e = e + c[d + 1]
	print(e)
except:
	pass


def same(d, a):
	for i in range(0, 31):
		if x[i] == a:
			print(x[i - 1], end='')
			break
		else:
			continue

def same1(d, a):
	for i in range(0, 31):
		if x[i] == a:
			print(x[i + 1], end='')
			break
		else:
			continue
x = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
n = input()
s = input()
if n == 'R':
	for i in range(0, len(s)):
		same(x, s[i])
else:
	for i in range(0, len(s)):
		same1(x, s[i])


word = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
incorrect = input()
correct = ''
if shift == 'R':
	for i in range(0, len(incorrect)):
		for j in range(0, len(word)):
			if incorrect[i] == word[j]:
				correct += word[j - 1]
			else:
				continue
else:
	for i in range(0, len(incorrect)):
		for j in range(0, len(word)):
			if incorrect[i] == word[j]:
				correct += word[j + 1]
			else:
				continue
print(correct)


flag = str(input())
if flag == 'R':
	flag = -1
elif flag == 'L':
	flag = 1
line0 = str(input())
line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
value = ''
for i in line0:
	if i in line1:
		value += line1[line1.find(i) + flag]
	elif i in line2:
		value += line2[line2.find(i) + flag]
	elif i in line3:
		value += line3[line3.find(i) + flag]
print(value)


d = input()
s = input()
abc = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
for i in s:
	if d == 'R':
		res += abc[abc.find(i) - 1]
	else:
		res += abc[abc.find(i) + 1]
print(res)


a = list('qwertyuiopasdfghjkl;zxcvbnm,./')
x = input()
y = list(input())
for i in range(len(y)):
	n = a.index(y[i])
	if x == 'R':
		y[i] = a[n - 1]
	else:
		y[i] = a[n + 1]
print(''.join(y))


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
b = input()
c = ' '
for i in b:
	if a == 'R':
		c = c + k[k.find(i) - 1]
	else:
		c = c + k[k.find(i) + 1]
print(c)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
Bukva = input()
stroka = input()
if Bukva == 'R':
	Bukva = -1
else:
	Bukva = 1
for i in stroka:
	if i in a:
		print(a[a.index(i) + Bukva], end='')
	elif i in b:
		print(b[b.index(i) + Bukva], end='')
	else:
		print(c[c.index(i) + Bukva], end='')


sdvig = input()
k = -1 if sdvig == 'R' else 1
abc = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = input()
t = ''
for w in s:
	n = abc.find(w)
	t += abc[n + k]
print(t)


dir = input()
s = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
result = [0] * len(s)
if dir == 'R':
	shift = -1
else:
	shift = 1
for i in range(len(s)):
	result[i] = keyboard[keyboard.index(s[i]) + shift]
print(''.join(result))


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
sdv = -1 if input() == 'R' else 1
for c in input():
	print(s[s.find(c) + sdv], end='')


arr = [''] * 3
arr[0] = 'qwertyuiop'
arr[1] = 'asdfghjkl;'
arr[2] = 'zxcvbnm,./'
s = input()
inp = input()
for i in inp:
	for j in arr:
		for k in range(len(j)):
			if j[k] == i:
				if s == 'R':
					print(j[k - 1], end='')
				else:
					print(j[k + 1], end='')


direction = input()
message = input()
keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for letter in message:
	pos = keys.index(letter)
	if direction == 'R':
		print(keys[pos - 1], end='')
	else:
		print(keys[pos + 1], end='')


klava = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if input() == 'R':
	s = input()
	sr = ''
	for i in range(len(s)):
		sr += klava[klava.find(s[i]) - 1]
	print(sr)
else:
	s = input()
	sl = ''
	for i in range(len(s)):
		sl += klava[klava.find(s[i]) + 1]
	print(sl)


shift = input()
col = 'qwertyuiopasdfghjkl;zxcvbnm,./'
col1 = list(col)
output = ''
if shift == 'R':
	entered1 = input()
	entered = list(entered1)
	for i in range(len(entered)):
		output = output + col1[col1.index(entered[i]) - 1]
else:
	entered1 = input()
	entered = list(entered1)
	for i in range(len(entered)):
		output = output + col1[col1.index(entered[i]) + 1]
print(output)


org = list('qwertyuiopasdfghjkl;zxcvbnm,./')
new = ''
a = input()
st = input()
if a == 'R':
	for i in st:
		t = org.index(i)
		new = new + org[t - 1]
else:
	for i in st:
		t = org.index(i)
		new = new + org[t + 1]
print(new)


ch = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = input()
if ch == 'R':
	di = -1
else:
	di = 1
for i in s:
	print(key[key.index(i) + di], end='')
print('')


d = input()
if d == 'R':
	d = -1
if d == 'L':
	d = 1
c = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = ''
for i in c:
	b += a[a.index(i) + d]
print(b)


a = input()
b = input()
c = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
word = ''
if a == 'R':
	for i in b:
		for j in c:
			if i in j:
				word += j[j.find(i) - 1]
else:
	for i in b:
		for j in c:
			if i in j:
				word += j[j.find(i) + 1]
print(word)


A = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = input()
s = input()
if l == 'R':
	for ch in s:
		print(A[A.index(ch) - 1], end='')
else:
	for ch in s:
		print(A[A.index(ch) + 1], end='')


alphabet = 'qwertyuiopasdfghjkl;zxcvbnm,./'
alphabet_map = {}
(x, y) = (0, 0)
keyboard = [[]]
line_breakers = 'az'
for char in alphabet:
	if char in line_breakers:
		x += 1
		y = 0
		keyboard.append([])
	alphabet_map[char] = (x, y)
	keyboard[x].append(char)
	y += 1
shift_char = input()
string_stream = input()
shift = 0
if shift_char == 'R':
	shift = -1
else:
	shift = 1
answer = ''
for char in string_stream:
	(x, y) = alphabet_map[char]
	if shift_char == 'R':
		answer += keyboard[x][max(y + shift, 0)]
	else:
		answer += keyboard[x][min(y + shift, 9)]
print(answer)


keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
right_decoder = {}
for z in keyboard:
	for i in range(1, len(z)):
		right_decoder[z[i]] = z[i - 1]
left_decoder = {}
for z in keyboard:
	for i in range(1, len(z)):
		left_decoder[z[i - 1]] = z[i]
decoders = {'R': right_decoder, 'L': left_decoder}
dec = input()
encoded = input()
print(''.join((decoders[dec][key] for key in encoded)))


one = 'qwertyuiop'
two = 'asdfghjkl;'
three = 'zxcvbnm,./'
d = {}
n = len(one)
for i in range(len(one)):
	char = one[i]
	if i - 1 >= 0 and i + 1 < n:
		d[char] = {'L': i - 1, 'R': i + 1, 'num': 'one'}
	elif i - 1 < 0:
		d[char] = {'R': i + 1, 'L': i + 1, 'num': 'one'}
	elif i + 1 >= n:
		d[char] = {'L': i - 1, 'R': i - 1, 'num': 'one'}
n = len(two)
for i in range(len(two)):
	char = two[i]
	if i - 1 >= 0 and i + 1 < n:
		d[char] = {'L': i - 1, 'R': i + 1, 'num': 'two'}
	elif i - 1 < 0:
		d[char] = {'R': i + 1, 'L': i + 1, 'num': 'two'}
	elif i + 1 >= n:
		d[char] = {'L': i - 1, 'R': i - 1, 'num': 'two'}
n = len(three)
for i in range(len(three)):
	char = three[i]
	if i - 1 >= 0 and i + 1 < n:
		d[char] = {'L': i - 1, 'R': i + 1, 'num': 'three'}
	elif i - 1 < 0:
		d[char] = {'R': i + 1, 'L': i + 1, 'num': 'three'}
	elif i + 1 >= n:
		d[char] = {'L': i - 1, 'R': i - 1, 'num': 'three'}
direction = input()
inp = input()
ans = ''
if direction == 'L':
	for i in inp:
		if d[i]['num'] == 'one':
			ans += one[d[i]['R']]
		elif d[i]['num'] == 'two':
			ans += two[d[i]['R']]
		elif d[i]['num'] == 'three':
			ans += three[d[i]['R']]
else:
	for i in inp:
		if d[i]['num'] == 'one':
			ans += one[d[i]['L']]
		elif d[i]['num'] == 'two':
			ans += two[d[i]['L']]
		elif d[i]['num'] == 'three':
			ans += three[d[i]['L']]
print(ans)


from sys import stdin

def corrido(entrada, letra):
	fila1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
	fila2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
	fila3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
	if letra == 'L':
		if entrada in fila1:
			entrada = fila1.index(entrada) + 1
			return fila1[entrada]
		if entrada in fila2:
			entrada = fila2.index(entrada) + 1
			return fila2[entrada]
		if entrada in fila3:
			entrada = fila3.index(entrada) + 1
			return fila3[entrada]
	if letra == 'R':
		if entrada in fila1:
			entrada = fila1.index(entrada) - 1
			return fila1[entrada]
		if entrada in fila2:
			entrada = fila2.index(entrada) - 1
			return fila2[entrada]
		if entrada in fila3:
			entrada = fila3.index(entrada) - 1
			return fila3[entrada]

def main():
	letra = stdin.readline().strip().upper()
	entrada = stdin.readline().strip()
	for x in range(len(entrada)):
		letrita = entrada[x]
		x = x + 1
		print(corrido(letrita, letra), end='')
main()


d = input()
k = input()
keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	for l in k:
		print(keys[keys.index(l) - 1], end='')
elif d == 'L':
	for l in k:
		print(keys[keys.index(l) + 1], end='')


side = input()
mes = input()
keyb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
for i in mes:
	if side == 'R':
		res += keyb[keyb.index(i) - 1]
	else:
		res += keyb[keyb.index(i) + 1]
print(res)


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
import statistics
from statistics import mode
mod = 1000000007

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def most_frequent(List):
	occurence_count = Counter(List)
	return occurence_count.most_common(1)[0][0]

def most_common(List):
	return mode(List)

def createMatrix(rowCount, colCount, dataList):
	mat = []
	for i in range(rowCount):
		rowList = []
		for j in range(colCount):
			if dataList[j] not in mat:
				rowList.append(dataList[j])
		mat.append(rowList)
	return mat

def isprime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
import collections

def minimalFilps1(bits):
	n = len(bits)
	flipsFromLeft = [0 for i in range(n)]
	flipsFromRight = [0 for i in range(n)]
	flips = 0
	for i in range(0, n, 1):
		if bits[i] == '1':
			flips = flips + 1
		flipsFromLeft[i] = flips
	flips = 0
	i = n - 1
	while i >= 0:
		if bits[i] == '0':
			flips = flips + 1
		i = i - 1
		flipsFromRight[i] = flips
	minFlips1 = sys.maxsize
	for i in range(1, n, 1):
		if flipsFromLeft[i - 1] + flipsFromRight[i] < minFlips1:
			minFlips1 = flipsFromLeft[i - 1] + flipsFromRight[i]
	return minFlips1

def minimalFilps(bits):
	n = len(bits)
	flipsFromLeft = [0 for i in range(n)]
	flipsFromRight = [0 for i in range(n)]
	flips = 0
	for i in range(0, n, 1):
		if bits[i] == '0':
			flips = flips + 1
		flipsFromLeft[i] = flips
	flips = 0
	i = n - 1
	while i >= 0:
		if bits[i] == '1':
			flips = flips + 1
		i = i - 1
		flipsFromRight[i] = flips
	minFlips = sys.maxsize
	for i in range(1, n, 1):
		if flipsFromLeft[i - 1] + flipsFromRight[i] < minFlips:
			minFlips = flipsFromLeft[i - 1] + flipsFromRight[i]
	return minFlips

def oddn(n):
	for i in range(2, n + 1):
		if i % 2 != 0 and n % i == 0:
			return i
	return 3
a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = list(c)
b = list(b)
d = []
if a == 'R':
	for i in range(len(b)):
		for j in range(1, len(c)):
			if b[i] == c[j]:
				e = j
				d.append(c[j - 1])
				break
else:
	for i in range(len(b)):
		for j in range(len(c) - 1):
			if b[i] == c[j]:
				e = j
				d.append(c[j + 1])
				break
d = ''.join(map(str, d))
print(d)


s = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
q = input()
l = input()
if q == 'R':
	t = -1
else:
	t = 1
z = ''
for i in range(len(l)):
	z = z + s[s.index(l[i]) + t]
print(z)


def solve(d, s):
	k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	d = 1 if d == 'L' else -1
	return ''.join(map(lambda x: k[k.find(x) + d], s))

def main():
	d = input()
	s = input()
	print(solve(d, s))
main()


d = input()
input = input()
string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in input:
	x = string.index(i)
	if d == 'R':
		print(string[x - 1], end='')
	else:
		print(string[x + 1], end='')


s = input()
w = input()
l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
res = ''
if s == 'R':
	for i in w:
		if i in l1:
			res += l1[l1.index(i) - 1]
		elif i in l2:
			res += l2[l2.index(i) - 1]
		elif i in l3:
			res += l3[l3.index(i) - 1]
else:
	for i in w:
		if i in l1:
			res += l1[l1.index(i) + 1]
		elif i in l2:
			res += l2[l2.index(i) + 1]
		elif i in l3:
			res += l3[l3.index(i) + 1]
print(res)


n = str(input())
s = str(input())
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
s1 = list(s1)
s2 = list(s2)
s3 = list(s3)
x = []
if n == 'R':
	for i in s:
		if i in s1:
			x.append(s1[s1.index(i) - 1])
		elif i in s2:
			x.append(s2[s2.index(i) - 1])
		elif i in s3:
			x.append(s3[s3.index(i) - 1])
elif n == 'L':
	for i in s:
		if i in s1:
			x.append(s1[s1.index(i) + 1])
		elif i in s2:
			x.append(s2[s2.index(i) + 1])
		elif i in s3:
			x.append(s3[s3.index(i) + 1])
x = ''.join(x)
print(x)


direction = input()
s1 = input()
hashmap = list('qwertyuiopasdfghjkl;zxcvbnm,./')
res = ''
for i in s1:
	if direction == 'R':
		res += hashmap[hashmap.index(i) - 1]
	else:
		res += hashmap[hashmap.index(i) + 1]
print(res)


d = input()
if d == 'R':
	x = -1
else:
	x = 1
l1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
l2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
l3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
l = list(input())
l4 = len(l)
s = ''
for i in range(l4):
	for j in range(10):
		if l[i] == l1[j]:
			s += str(l1[j + x])
	for j in range(10):
		if l[i] == l2[j]:
			s += str(l2[j + x])
	for j in range(10):
		if l[i] == l3[j]:
			s += str(l3[j + x])
print(s)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
f = input()
d = input()
n = ''
for i in d:
	if i in a:
		m = a.find(i)
		if f == 'R':
			m -= 1
		else:
			m += 1
		n += a[m]
	if i in b:
		m = b.find(i)
		if f == 'R':
			m -= 1
		else:
			m += 1
		n += b[m]
	if i in c:
		m = c.find(i)
		if f == 'R':
			m -= 1
		else:
			m += 1
		n += c[m]
print(n)


n = input()
a = str(input().lower())
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
e = ''
for i in a:
	if n == 'R':
		e = e + s[s.find(i) - 1]
	if n == 'L':
		e = e + s[s.find(i) + 1]
print(e)


side = input()
text = input()
alphabet = list('qwertyuiopasdfghjkl;zxcvbnm,./')
for i in text:
	if side == 'R':
		print(alphabet[alphabet.index(i) - 1], end='')
	else:
		print(alphabet[alphabet.index(i) + 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = input()
s = input()
x = lambda c: a[a.index(c) + (1 if b == 'L' else -1)]
print(''.join(map(x, s)))


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
d = input()
s = input()
n = 0
if d == 'R':
	n = -1
else:
	n = 1
for i in s:
	if a.find(i) != -1:
		i = a.find(i) + n
		if i > 9:
			i = 9
		if i < 0:
			i = 0
		print(a[i], end='')
		continue
	if b.find(i) != -1:
		i = b.find(i) + n
		if i > 9:
			i = 9
		if i < 0:
			i = 0
		print(b[i], end='')
		continue
	if c.find(i) != -1:
		i = c.find(i) + n
		if i > 9:
			i = 9
		if i < 0:
			i = 0
		print(c[i], end='')
		continue


KEYBOARD = 'qwertyuiopasdfghjkl;zxcvbnm,./'
MOVES = {'R': str.maketrans(KEYBOARD[1:], KEYBOARD[:-1]), 'L': str.maketrans(KEYBOARD[:-1], KEYBOARD[1:])}
direction = MOVES[input()]
print(input().translate(direction))


dic = 'qwertyuiop0asdfghjkl;0zxcvbnm,./'
N = input()
if N == 'L':
	move = 1
else:
	move = -1
line = input()
out = ''
for i in range(len(line)):
	a = dic.find(line[i])
	out += dic[a + move]
print(out)


n = input()
s = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
result = ''
last = 0
for i in s:
	last = keyboard.index(i)
	if n == 'R':
		result += keyboard[last - 1]
	if n == 'L':
		result += keyboard[last + 1]
print(result)


dir = input()
s = input()
row1 = 'qwertyuiop'
row2 = 'asdfghjkl;'
row3 = 'zxcvbnm,./'
result = [0] * len(s)
if dir == 'R':
	shift = -1
else:
	shift = 1
for i in range(len(s)):
	if s[i] in row1:
		result[i] = row1[row1.index(s[i]) + shift]
	elif s[i] in row2:
		result[i] = row2[row2.index(s[i]) + shift]
	elif s[i] in row3:
		result[i] = row3[row3.index(s[i]) + shift]
print(''.join(result))


x = input()
s = input()
p = 0
if x == 'R':
	p -= 1
elif x == 'L':
	p += 1
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(s)):
	for j in range(len(l)):
		if s[i] == l[j]:
			print(l[j + p], end='')


shiftDirection = input()
charsEnteredByMode = input()
keyLine1 = 'qwertyuiop'
keyLine2 = 'asdfghjkl;'
keyLine3 = 'zxcvbnm,./'
actualMsg = ''
valueAdjustment = 0
if shiftDirection == 'L':
	valueAdjustment = 1
elif shiftDirection == 'R':
	valueAdjustment = -1
for char in charsEnteredByMode:
	if keyLine1.find(char) != -1:
		actualMsg += keyLine1[keyLine1.find(char) + valueAdjustment]
	elif keyLine2.find(char) != -1:
		actualMsg += keyLine2[keyLine2.find(char) + valueAdjustment]
	elif keyLine3.find(char) != -1:
		actualMsg += keyLine3[keyLine3.find(char) + valueAdjustment]
print(actualMsg)


b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
s = input()
if a == 'R':
	for i in s:
		print(b[b.index(i) - 1], end='')
else:
	for i in s:
		print(b[b.index(i) + 1], end='')


alphabet = 'qwertyuiopasdfghjkl;zxcvbnm,./'
side = str(input())
text = list(input())
if side == 'R':
	for i in range(0, len(text)):
		for j in range(0, len(alphabet)):
			if text[i] == list(alphabet)[j]:
				print(list(alphabet)[j - 1], end='')
if side == 'L':
	for i in range(0, len(text)):
		for j in range(0, len(alphabet)):
			if text[i] == list(alphabet)[j]:
				print(list(alphabet)[j + 1], end='')


arrow = input('')
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
message = input('')
s = ''
if arrow == 'R':
	for char in message:
		s += keyboard[keyboard.find(char) - 1]
elif arrow == 'L':
	for char in message:
		s += keyboard[keyboard.find(char) + 1]
print(s)


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
inp = input()
n = len(inp)
if shift == 'R':
	d = -1
else:
	d = 1
sen = ''
for i in range(n):
	for j in range(30):
		if inp[i] == keys[j]:
			sen += keys[j + d]
print(sen)


matriz = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
mapa = {}
for i in range(3):
	for j in range(10):
		if j - 1 >= 0:
			mapa[str(matriz[i][j]) + 'R'] = matriz[i][j - 1]
		if j + 1 < 10:
			mapa[str(matriz[i][j]) + 'L'] = matriz[i][j + 1]
dir = input()
teste = input()
for eachchar in list(teste):
	print(mapa[str(eachchar) + dir], end='')
print()


in1 = input()
l1 = input()
kb = "qwertyuiop[]asdfghjkl;'\\|zxcvbnm,./"
l2 = ''
for i in range(len(l1)):
	if in1 == 'R':
		l2 += kb[kb.find(l1[i]) - 1]
	else:
		l2 += kb[kb.find(l1[i]) + 1]
print(l2)


q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
string = ''
k = input()
j = input()
for i in j:
	if k == 'R':
		string = string + q[q.index(i) - 1]
	else:
		string = string + q[q.index(i) + 1]
print(string)


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'R':
	for i in b:
		d = c.index(i)
		print(c[d - 1], end='')
else:
	for i in b:
		d = c.index(i)
		print(c[d + 1], end='')


key = 'qwertyuiopasdfghjkl;;zxcvbnm,./'
d = input()
m = input()
x = 1
if d == 'R':
	x = -1
for each in m:
	i = key.index(each)
	print(key[i + x], end='')


kl = 'qwertyuiopasdfghjkl;zxcvbnm,./'
kd = {}
for (i, l) in enumerate(kl):
	kd[l] = i
dirE = input()
stri = input()

def fixE(i):
	if dirE == 'L':
		return i + 1
	else:
		return i - 1
for l in stri:
	print(kl[fixE(kd[l])], end='')
print('')


d = input()
a = list(input())
st = 'qwertyuiopasdfghjkl;zxcvbnm,./'
st = list(st)
word = []
for i in range(len(a)):
	if d == 'R':
		b = st[st.index(a[i]) - 1]
		word.append(b)
	else:
		b = st[st.index(a[i]) + 1]
		word.append(b)
print(''.join(word))


dir = str(input())
t = str(input())
s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
str = ''
if dir == 'R':
	for i in t:
		str = str + s1[s1.index(i) - 1]
else:
	for i in t:
		str = str + s1[s1.index(i) + 1]
print(str)


SS = ''
k = input()
S = input()
D = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(S)):
	l = D.find(S[i])
	if k == 'R':
		SS += D[l - 1]
	else:
		SS = SS + D[l + 1]
print(SS)


y = input()
x = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if y == 'R':
	for i in x:
		ind = k.index(i)
		print(k[ind - 1], end='')
elif y == 'L':
	for i in x:
		ind = k.index(i)
		print(k[ind + 1], end='')


c = input()
s = input()
x = 'qwertyuiop'
p = list(x)
y = 'asdfghjkl;'
q = list(y)
z = 'zxcvbnm,./'
r = list(z)
if c == 'R':
	for i in s:
		if i in x:
			k = p.index(i)
			print(p[k - 1], end='')
		elif i in y:
			k = q.index(i)
			print(q[k - 1], end='')
		elif i in z:
			k = r.index(i)
			print(r[k - 1], end='')
else:
	for i in s:
		if i in x:
			k = p.index(i)
			print(p[k + 1], end='')
		elif i in y:
			k = q.index(i)
			print(q[k + 1], end='')
		elif i in z:
			k = r.index(i)
			print(r[k + 1], end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
(letter, string) = (input(), input())
string = list(string)
for (i, str) in enumerate(string):
	if letter == 'R':
		string[i] = keyboard[keyboard.find(str) - 1]
	else:
		string[i] = keyboard[keyboard.find(str) + 1]
print(''.join(string))


c = input()
string = input()
line = ''
key1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
for item in string:
	ind = key1.index(item)
	if c == 'R':
		line += key1[ind - 1]
	if c == 'L':
		line += key1[ind + 1]
print(line)


d = input()
s = input()
A = 'qwertyuiopasdfghjkl;zxcvbnm,./'
sout = ''
if d == 'R':
	for i in range(len(s)):
		sout += A[A.find(s[i]) - 1]
else:
	for i in range(len(s)):
		sout += A[A.find(s[i]) + 1]
print(sout)


lr = str(input())
s = str(input())
ss = ''
l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
if lr == 'R':
	for i in range(len(s)):
		if s[i] in l1:
			for j in range(1, len(l1)):
				if s[i] == l1[j]:
					ss += l1[j - 1]
		if s[i] in l2:
			for j in range(1, len(l2)):
				if s[i] == l2[j]:
					ss += l2[j - 1]
		if s[i] in l3:
			for j in range(1, len(l3)):
				if s[i] == l3[j]:
					ss += l3[j - 1]
if lr == 'L':
	for i in range(len(s)):
		if s[i] in l1:
			for j in range(len(l1) - 1):
				if s[i] == l1[j]:
					ss += l1[j + 1]
		if s[i] in l2:
			for j in range(len(l2) - 1):
				if s[i] == l2[j]:
					ss += l2[j + 1]
		if s[i] in l3:
			for j in range(len(l3) - 1):
				if s[i] == l3[j]:
					ss += l3[j + 1]
print(ss)


a = 'qwertyuiop'
m = list(a)
b = 'asdfghjkl;'
n = list(b)
c = 'zxcvbnm,./'
o = list(c)
d = []
x = input()
y = input()
if x == 'R':
	for i in range(0, len(y)):
		z = y[i]
		if z in m:
			d.append(m[m.index(z) - 1])
		elif z in n:
			d.append(n[n.index(z) - 1])
		else:
			d.append(o[o.index(z) - 1])
else:
	for i in range(0, len(y)):
		z = y[i]
		if z in m:
			d.append(m[m.index(z) + 1])
		elif z in n:
			d.append(n[n.index(z) + 1])
		else:
			d.append(o[o.index(z) + 1])
print(''.join(d))


dic = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if input() == 'R':
	offset = -1
else:
	offset = +1
s = input()
for c in s:
	print(dic[str.find(dic, c) + offset], end='')


n = input()
m = input()
q = 'qwertyuiop'
w = 'asdfghjkl;'
e = 'zxcvbnm,./'
p = ''
if n == 'R':
	for i in m:
		if i not in {'a', 'q', 'z'}:
			if i in q:
				p += '{}'.format(q[q.index(i) - 1])
			elif i in w:
				p += '{}'.format(w[w.index(i) - 1])
			elif i in e:
				p += '{}'.format(e[e.index(i) - 1])
		else:
			p += i
if n == 'L':
	for i in m:
		if i not in {'p', ';', '/'}:
			if i in q:
				p += '{}'.format(q[q.index(i) + 1])
			elif i in w:
				p += '{}'.format(w[w.index(i) + 1])
			elif i in e:
				p += '{}'.format(e[e.index(i) + 1])
		else:
			p += i
print(p)


d = input()

def fixed(direction, word):
	keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	new = []
	if direction == 'R':
		for x in word:
			z = keyboard.index(x) - 1
			new.append(keyboard[z])
		return ''.join(new)
	else:
		for x in word:
			z = keyboard.index(x) + 1
			new.append(keyboard[z])
		return ''.join(new)
print(fixed(d, input()))


t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
i = input()
txt = input()
for j in txt:
	if i == 'R':
		if j == 'q':
			print('q', end='')
		if j == 'a':
			print('a', end='')
		if j == 'z':
			print('z', end='')
		else:
			k = t.index(j)
			print(t[k - 1], end='')
	if i == 'L':
		if j == '/':
			print('/', end='')
		if j == ';':
			print(';', end='')
		if j == 'p':
			print('p', end='')
		else:
			k = t.index(j)
			print(t[k + 1], end='')


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = keys[-1] + keys[:-1] if input() == 'R' else keys[1:] + keys[0]
table = str.maketrans(keys, shift)
print(input().translate(str.maketrans(table)))


import math
shift = input('')
faulty_str = input('')
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
result = str('')
keyboard_list = [str(x) for x in keyboard]
faulty_str_list = [str(x) for x in faulty_str]
if shift == 'L':
	for i in faulty_str_list:
		index = keyboard_list.index(i)
		result = result + keyboard_list[index + 1]
else:
	for i in faulty_str_list:
		index = keyboard_list.index(i)
		result = result + keyboard_list[index - 1]
print(result)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
q = input()
w = input()
j = ''
for x in w:
	if x in a:
		if q == 'R':
			j += a[a.index(x) - 1]
		else:
			j += a[a.index(x) + 1]
	elif x in b:
		if q == 'R':
			j += b[b.index(x) - 1]
		else:
			j += b[b.index(x) + 1]
	elif q == 'R':
		j += c[c.index(x) - 1]
	else:
		j += c[c.index(x) + 1]
print(j)


a = 'qwertyuiop'
a = [i for i in a]
b = 'asdfghjkl;'
b = [i for i in b]
c = 'zxcvbnm,./'
c = [i for i in c]
comm = input()
z = input()
ans = ''
if comm == 'R':
	for i in z:
		k = []
		if i in a:
			k = a
		elif i in b:
			k = b
		elif i in c:
			k = c
		for p in range(len(k)):
			if k[p] == i:
				ans += k[p - 1]
if comm == 'L':
	for i in z:
		k = []
		if i in a:
			k = a
		elif i in b:
			k = b
		elif i in c:
			k = c
		for p in range(len(k)):
			if k[p] == i:
				ans += k[p + 1]
print(ans)


sRef = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = dict()
for i in range(len(sRef)):
	d[sRef[i]] = i
direc = input()
s = input()
if direc == 'L':
	delta = 1
else:
	delta = -1
print(''.join((sRef[d[c] + delta] for c in s)))


keyboard = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
postion = input()
s = input()
if postion == 'L':
	move = 1
else:
	move = -1
for i in range(0, len(s)):
	if s[i] in keyboard[0]:
		print(keyboard[0][keyboard[0].index(s[i]) + move], end='')
	elif s[i] in keyboard[1]:
		print(keyboard[1][keyboard[1].index(s[i]) + move], end='')
	else:
		print(keyboard[2][keyboard[2].index(s[i]) + move], end='')


lap = input()
cod = input()
buk = 'qwertyuiopasdfghjkl;zxcvbnm,./'
nov = ''
n = len(cod)
if lap == 'R':
	for i in range(n):
		nov = nov + buk[int(buk.find(cod[i])) - 1]
	print(nov)
if lap == 'L':
	for i in range(n):
		nov = nov + buk[int(buk.find(cod[i])) + 1]
	print(nov)


k = input()
s = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
s4 = [0] * len(s)
for i in range(len(s)):
	for i2 in range(len(s1)):
		if k == 'L':
			if s[i] == s1[i2]:
				s4[i] = s1[i2 + 1]
			if s[i] == s2[i2]:
				s4[i] = s2[i2 + 1]
			if s[i] == s3[i2]:
				s4[i] = s3[i2 + 1]
		else:
			if s[i] == s1[i2]:
				s4[i] = s1[i2 - 1]
			if s[i] == s2[i2]:
				s4[i] = s2[i2 - 1]
			if s[i] == s3[i2]:
				s4[i] = s3[i2 - 1]
for i in range(len(s)):
	print(s4[i], end='')


LR = input()
s = input()
str = []
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(a)):
	str.append(a[i])
for j in s:
	k = str.index(j)
	if LR == 'R':
		print(str[k - 1], end='')
	else:
		print(str[k + 1], end='')


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	a = 'qwertyuiop'
	b = 'asdfghjkl;'
	c = 'zxcvbnm,./'
	n = S()
	s = S()
	ans = []
	if n == 'L':
		for x in s:
			if a.count(x):
				ind = a.index(x)
				ans.append(a[ind + 1])
			if b.count(x):
				ind = b.index(x)
				ans.append(b[ind + 1])
			if c.count(x):
				ind = c.index(x)
				ans.append(c[ind + 1])
	else:
		for x in s:
			if a.count(x):
				ind = a.index(x)
				ans.append(a[ind - 1])
			if b.count(x):
				ind = b.index(x)
				ans.append(b[ind - 1])
			if c.count(x):
				ind = c.index(x)
				ans.append(c[ind - 1])
	return ''.join(ans)
print(main())


c = str(input())
a = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
s = str(input())
ans = ''
if c == 'R':
	for k in range(0, len(s)):
		for i in range(0, 3):
			for j in range(1, 10):
				if a[i][j] == s[k]:
					ans = str(ans) + str(a[i][j - 1])
else:
	for k in range(0, len(s)):
		for i in range(0, 3):
			for j in range(0, 9):
				if a[i][j] == s[k]:
					ans = str(ans) + str(a[i][j + 1])
print(ans)


shift = input()
txt = input()
keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if shift == 'R':
	shift = -1
else:
	shift = 1
txt2 = ''
for letter in txt:
	ind = keys.find(letter)
	txt2 += keys[ind + shift]
print(txt2)


a = input()
b = input()
b = list(b)
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = list(l)
l1 = []
if a == 'R':
	for i in range(len(b)):
		x = l.index(b[i])
		l1.append(l[x - 1])
else:
	for i in range(len(b)):
		x = l.index(b[i])
		l1.append(l[x + 1])
print(''.join(map(str, l1)))


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
message = input()
dir = 1 if shift == 'L' else -1
for ch in message:
	print(keyboard[keyboard.index(ch) + dir], end='')


import sys
import math
direction = sys.stdin.readline()
instr = sys.stdin.readline()
t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k = []
for i in range(len(instr) - 1):
	ind = t.index(instr[i])
	if direction[0] == 'R':
		if ind % 10 != 0:
			k.append(t[ind - 1])
		else:
			k.append(t[ind])
	elif (ind + 1) % 10 != 0:
		k.append(t[ind + 1])
	else:
		k.append(t[ind])
print(''.join(k))


sts = input()
strs = input()
strs = list(strs)
strs_1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
strs_1 = list(strs_1)
s = ''
if sts == 'R':
	for i in range(len(strs)):
		ks = strs[i]
		ls = strs_1.index(ks)
		ls = ls - 1
		strs[i] = strs_1[ls]
elif sts == 'L':
	for i in range(len(strs)):
		ks = strs[i]
		ls = strs_1.index(ks)
		ls = ls + 1
		strs[i] = strs_1[ls]
for i in range(len(strs)):
	s += strs[i]
print(s)


string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
rorp = input()
final_string = input()
haha = []
if rorp == 'R':
	for i in final_string:
		haha.append(string[string.index(i) - 1])
else:
	for i in final_string:
		haha.append(string[string.index(i) + 1])
print(''.join(haha))


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = -1 if input() == 'R' else 1
txt = input()
original = ''
for c in txt:
	original += keys[keys.index(c) + direction]
print(original)


(a, b, c) = ('qwertyuiopasdfghjkl;zxcvbnm,./', input(), input())
print(''.join((a[a.index(i) + 1] for i in c)) if b == 'L' else ''.join((a[a.index(i) - 1] for i in c)))


n = input()
k = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if n == 'R':
	for i in range(len(k)):
		p = s.find(k[i])
		print(s[p - 1], end='')
if n == 'L':
	for i in range(len(k)):
		p = s.find(k[i])
		print(s[p + 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
string = input()
rs = ''
if n == 'R':
	for i in string:
		rs += a[a.index(i) - 1]
else:
	for i in string:
		rs += a[a.index(i) + 1]
print(rs)


qwerty = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = []
if input() == 'R':
	r = True
else:
	r = False
a = input()
if r:
	for item in a:
		ans += [qwerty[qwerty.find(item) - 1]]
else:
	for item in a:
		ans += [qwerty[qwerty.find(item) + 1]]
print(''.join(ans))


(k, l, m) = ('qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./')
result = ''
i = input()
r = input()
for p in r:
	for _ in [k, l, m]:
		if p in _:
			if i == 'R':
				result += _[_.index(p) - 1]
			else:
				result += _[_.index(p) + 1]
			break
print(result)


(direction, s) = (input(), input())
cod = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = ''
if direction == 'R':
	for ch in s:
		n += cod[cod.index(ch) - 1]
else:
	for ch in s:
		n += cod[cod.index(ch) + 1]
print(n)


direc = input()
s = input()
dup = s
if direc == 'R':
	steer = -1
else:
	steer = +1
ans = ''
key_list = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
for x in s:
	for y in key_list:
		if x in y:
			for z in range(len(y)):
				if y[z] == x and direc == 'R':
					ans += y[z - 1]
				elif y[z] == x and direc == 'L':
					ans += y[z + 1]
				else:
					pass
print(ans)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
a = input()
f = ''
if c == 'R':
	for i in range(len(a)):
		index = s.index(a[i])
		f += s[index - 1]
if c == 'L':
	for i in range(len(a)):
		index = s.index(a[i])
		f += s[index + 1]
print(f)


dir = input()
if dir == 'L':
	dir = 1
else:
	dir = -1
s = input()
s1 = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
d = dict()
for i in range(len(s1)):
	d[s1[i]] = i + dir
for i in s:
	print(s1[d[i]], end='')


move = input()
msg = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
for e in msg:
	if move == 'L':
		res += keyboard[keyboard.find(e) + 1]
	else:
		res += keyboard[keyboard.find(e) - 1]
print(res)


n = input()
word = input()
rw = str()
a1 = list('qwertyuiop')
a2 = list('asdfghjkl;')
a3 = list('zxcvbnm,./')
if n == 'R':
	for i in range(len(word)):
		buk = word[i]
		if word[i] in a1:
			rw += a1[a1.index(buk) - 1]
		elif word[i] in a2:
			rw += a2[a2.index(buk) - 1]
		else:
			rw += a3[a3.index(buk) - 1]
elif n == 'L':
	for i in range(len(word)):
		buk = word[i]
		if word[i] in a1:
			rw += a1[a1.index(buk) + 1]
		elif word[i] in a2:
			rw += a2[a2.index(buk) + 1]
		else:
			rw += a3[a3.index(buk) + 1]
print(rw)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = ['R', 'L']
n = (-1) ** d.index(input())
h = ''
for i in input():
	h += s[s.index(i) - n]
print(h)


import re
direction = input()
txt = input()
s1 = ' qwertyuiop '
s2 = ' asdfghjkl; '
s3 = ' zxcvbnm,./ '

def correctText(direction):
	answer = ''
	for s in txt:
		if s in s1:
			answer += s1[s1.find(s) - 1 * direction]
		elif s in s2:
			answer += s2[s2.find(s) - 1 * direction]
		else:
			answer += s3[s3.find(s) - 1 * direction]
	answer = re.sub(' +', '', answer)
	return answer
if direction == 'R':
	print(correctText(1))
else:
	print(correctText(-1))


d = input()
msg = input()
r = 1 if d == 'L' else -1
seq = 'qwertyuiopasdfghjkl;zxcvbnm,./'
rm = ''
for i in range(len(msg)):
	rm += seq[seq.index(msg[i]) + r]
print(rm)


n = input()
s = input()
arr = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(s)):
	if n == 'R':
		for j in range(len(arr)):
			if s[i] == arr[j]:
				print(arr[j - 1], end='')
	elif n == 'L':
		for k in range(len(arr)):
			if s[i] == arr[k]:
				print(arr[k + 1], end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
char = input()
message = list(input())
for i in range(len(message)):
	if char == 'R':
		message[i] = keyboard[keyboard.index(message[i]) - 1]
	else:
		message[i] = keyboard[keyboard.index(message[i]) + 1]
print(''.join(message))


s = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = ''
if s == 'R':
	for l in input():
		for i in range(len(a)):
			if l == a[i]:
				x += a[i - 1]
if s == 'L':
	for l in input():
		for i in range(len(a)):
			if l == a[i]:
				x += a[i + 1]
print(x)


x = input()
s = input()
p = ''
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if x == 'R':
	for i in range(len(s)):
		j = a.index(s[i])
		p = p + a[j - 1]
else:
	for i in range(len(s)):
		j = a.index(s[i])
		p = p + a[j + 1]
print(p)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
side = input()
message = input()
s = ''
for i in message:
	if side == 'R':
		s += a[a.index(i) - 1]
	else:
		s += a[a.index(i) + 1]
print(s)


x = input()
y = list(input())
p1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
p2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
p3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
n = -1
if x == 'L':
	n = 1
for i in y:
	if i in p1:
		print(p1[p1.index(i) + n], end='')
	elif i in p2:
		print(p2[p2.index(i) + n], end='')
	elif i in p3:
		print(p3[p3.index(i) + n], end='')


a = str(input())
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = str(input())
c = ''
if a == 'R':
	for i in range(len(b)):
		xinxuhao = s.index(b[i]) - 1
		c = c + s[xinxuhao]
	print(c)
else:
	for i in range(len(b)):
		xinxuhao = s.index(b[i]) + 1
		c = c + s[xinxuhao]
	print(c)


shift = input()
move = 0
if shift == 'L':
	move = 1
else:
	move = -1
str1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
L = list(str1)
L2 = list(input())
for i in L2:
	for j in range(len(L)):
		if L[j] == i:
			print(L[j + move], end='')


def newR(str, charx):
	indx = str.index(charx)
	return str[indx - 1]

def newL(str, charx):
	indx = str.index(charx)
	return str[indx + 1]
one = 'qwertyuiop'
two = 'asdfghjkl;'
three = 'zxcvbnm,./'
a = input()
if a == 'R':
	finalstr = ''
	string = input()
	for i in string:
		if i in one:
			finalstr += newR(one, i)
		elif i in two:
			finalstr += newR(two, i)
		else:
			finalstr += newR(three, i)
	print(finalstr)
if a == 'L':
	finalstr = ''
	string = input()
	for i in string:
		if i in one:
			finalstr += newL(one, i)
		elif i in two:
			finalstr += newL(two, i)
		else:
			finalstr += newL(three, i)
	print(finalstr)


def main():
	direction = input()
	est = input()
	right = {'p': 'o', ';': 'l', '/': '.', 'o': 'i', 'l': 'k', '.': ',', 'i': 'u', 'k': 'j', ',': 'm', 'u': 'y', 'j': 'h', 'm': 'n', 'y': 't', 'h': 'g', 'n': 'b', 't': 'r', 'g': 'f', 'b': 'v', 'r': 'e', 'f': 'd', 'v': 'c', 'e': 'w', 'd': 's', 'c': 'x', 'w': 'q', 's': 'a', 'x': 'z'}
	left = {'o': 'p', 'l': ';', '.': '/', 'i': 'o', 'k': 'l', ',': '.', 'u': 'i', 'j': 'k', 'm': ',', 'y': 'u', 'h': 'j', 'n': 'm', 't': 'y', 'g': 'h', 'b': 'n', 'r': 't', 'f': 'g', 'v': 'b', 'e': 'r', 'd': 'f', 'c': 'v', 'w': 'e', 's': 'd', 'x': 'c', 'q': 'w', 'a': 's', 'z': 'x'}
	if direction == 'R':
		print(''.join([right[x] for x in est]))
	else:
		print(''.join([left[x] for x in est]))
main()


shift = input()
s = input()
kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for c in s:
	i = kb.index(c)
	i += 1 if shift == 'L' else -1
	print(kb[i], end='')


k = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for c in input():
	print(s[s.index(c) + [-1, 1][k == 'L']], end='')


n = input()
s = input()
b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
result = ''
if n == 'R':
	for i in s:
		result += b[b.index(i) - 1]
else:
	for i in s:
		result += b[b.index(i) + 1]
print(result)


a = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
l = {}
for i in a:
	for j in range(1, len(i)):
		l[i[j - 1]] = i[j]
r = {}
for i in a:
	for j in range(len(i) - 1):
		r[i[j + 1]] = i[j]
n = str(input())
s = str(input())
if n == 'R':
	ans = ''
	for i in s:
		ans += r[i]
	print(ans)
else:
	ans = ''
	for i in s:
		ans += l[i]
	print(ans)


stri = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
strin = input()
li = ''
k = 0
if a == 'R':
	k = -1
else:
	k = 1
for i in range(len(strin)):
	l = stri.index(strin[i])
	if l == 29 and k == 1:
		li += 'q'
	elif l == 0 and k == -1:
		li += '/'
	else:
		li += stri[l + k]
print(li)


from typing import Tuple

def parse_input() -> Tuple[str, str]:
	return (input(), input())

def solve(shift: str, message: str) -> str:
	keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	shift_map = {}
	for (idx, char) in enumerate(keyboard):
		if idx == 0:
			shift_map[char] = {'L': keyboard[idx + 1]}
		elif idx == len(keyboard) - 1:
			shift_map[char] = {'R': keyboard[idx - 1]}
		else:
			shift_map[char] = {'R': keyboard[idx - 1], 'L': keyboard[idx + 1]}
	return ''.join([shift_map[char][shift] for char in message])
(s, m) = parse_input()
print(solve(s, m))


dir = input()
typed = input()
keyboard_top = 'qwertyuiop'
keyboard_mid = 'asdfghjkl;'
keyboard_bot = 'zxcvbnm,./'
lst = [keyboard_top, keyboard_mid, keyboard_bot]
dic = {}
reverse = {'R': 'L', 'L': 'R'}
for keyboard_pos in lst:
	for i in range(len(keyboard_pos)):
		char = keyboard_pos[i]
		if i > 0:
			dic[char, 'L'] = keyboard_pos[i - 1]
		if i < len(keyboard_pos) - 1:
			dic[char, 'R'] = keyboard_pos[i + 1]
result = ''
rev = reverse[dir]
for char in typed:
	result += dic[char, rev]
print(result)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k = input()
s = input()
for i in s:
	if k == 'R':
		print(a[a.find(i) - 1], end='')
	else:
		print(a[a.find(i) + 1], end='')


ggg = input()
s = input()
s = list(s)
right = []
left = []
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if ggg == 'R':
	for i in s:
		right.append(keyboard[keyboard.index(i) - 1])
else:
	for i in s:
		left.append(keyboard[keyboard.index(i) + 1])
right = ''.join(right)
left = ''.join(left)
if ggg == 'R':
	print(right)
else:
	print(left)


st = 'qwertyuiopasdfghjkl;zxcvbnm,./'
r = input
v = r()
s = r()
print(''.join([st[st.index(x) + [1, -1][v == 'R']] for x in s]))


__author__ = 'Bian'
kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
if n == 'R':
	t = -1
else:
	t = 1
m = input()
o = ''
for i in m:
	for j in range(len(kb)):
		if i == kb[j]:
			o += kb[j + t]
print(o)


def find(ch, offset):
	for (idx, char) in enumerate(vocab):
		if ch == char:
			return vocab[idx + offset]
vocab = 'qwertyuiopasdfghjkl;zxcvbnm,./'
dir = input()
chars = input()
offset = -1 if dir == 'R' else 1
res = ''
for ch in chars:
	res += find(ch, offset)
print(res)


pos = 1
if input() == 'R':
	pos = -1
s = list(input())
a = ''
b = list('qwertyuiopasdfghjkl;zxcvbnm,./')
for i in range(len(s)):
	s[i] = b[b.index(s[i]) + pos]
print(''.join(s))


s = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for l in input():
	print(a[a.index(l) + [1, -1][s == 'R']], end='')


str = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ch = input()
word = input()
if ch == 'L':
	for i in range(len(word)):
		for j in range(len(str)):
			if word[i] == str[j]:
				print(str[j + 1], end='')
				break
else:
	for i in range(len(word)):
		for j in range(len(str)):
			if word[i] == str[j]:
				print(str[j - 1], end='')
				break


l = input()
s = input()
st = []
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
if l == 'R':
	for i in s:
		if i in a:
			print(a[a.index(i) - 1], end='')
		if i in b:
			print(b[b.index(i) - 1], end='')
		if i in c:
			print(c[c.index(i) - 1], end='')
if l == 'L':
	for i in s:
		if i in a:
			print(a[a.index(i) + 1], end='')
		if i in b:
			print(b[b.index(i) + 1], end='')
		if i in c:
			print(c[c.index(i) + 1], end='')


d = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = input()
answer = ''
for letter in s:
	indx = k.index(letter)
	if d == 'R':
		answer += k[indx - 1]
	else:
		answer += k[indx + 1]
print(answer)


x = input()
Ref = 'qwertyuiopasdfghjkl;zxcvbnm,./'
y = input()
s = ''
for i in range(len(y)):
	if x == 'R':
		s += Ref[Ref.index(y[i]) - 1]
	else:
		s += Ref[Ref.index(y[i]) + 1]
print(s)


a = input()
s = input()
o = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
if a == 'R':
	print(*(o[o.index(i) - 1] for i in s), sep='')
else:
	print(*(o[o.index(i) + 1] for i in s), sep='')


def main():
	row1 = 'qwertyuiop'
	row2 = 'asdfghjkl;'
	row3 = 'zxcvbnm,./'
	orint = input()
	s = input()
	new = ''
	for i in s:
		if i in row1:
			pos = row1.find(i)
			if orint == 'R':
				new += row1[pos - 1]
			else:
				new += row1[pos + 1]
		elif i in row2:
			pos = row2.find(i)
			if orint == 'R':
				new += row2[pos - 1]
			else:
				new += row2[pos + 1]
		else:
			pos = row3.find(i)
			if orint == 'R':
				new += row3[pos - 1]
			else:
				new += row3[pos + 1]
	print(new)
main()


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = list(a)
n = input()
c = input()
if n == 'R':
	for i in range(len(c)):
		for j in range(len(b)):
			if b[j] == c[i]:
				print(b[j - 1], end='')
				break
if n == 'L':
	for i in range(len(c)):
		for j in range(len(b)):
			if b[j] == c[i]:
				print(b[j + 1], end='')
				break


def finding_word(character, string, direction):
	for i in range(len(string)):
		if string[i] == character and direction == 'R':
			return string[i - 1]
		elif string[i] == character and direction == 'L':
			return string[i + 1]
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
direction = input()
word = str(input())
word2 = ''
for i in range(0, len(word)):
	if word[i] in a:
		word2 += finding_word(word[i], a, direction)
	elif word[i] in b:
		word2 += finding_word(word[i], b, direction)
	else:
		word2 += finding_word(word[i], c, direction)
print(word2)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
s = input()
l = len(s)
inc = 0
if shift == 'L':
	inc = 1
else:
	inc = -1
res = ''
for i in range(l):
	res += keyboard[keyboard.find(s[i]) + inc]
print(res)


d = input()
ex = input()
p = []
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'L':
	for i in ex:
		p.append(l[l.index(i) + 1])
else:
	for i in ex:
		p.append(l[l.index(i) - 1])
print(''.join(p))


flag = input()
if flag == 'R':
	t = -1
else:
	t = 1
s = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
m = ' '
for i in range(0, len(s)):
	f = 0
	for j in range(0, len(s1)):
		if s[i] == s1[j]:
			temp = s1[int((j + t + len(s1)) % len(s1))]
			m += temp
			f = 1
			break
	if f == 1:
		continue
	for j in range(0, len(s2)):
		if s[i] == s2[j]:
			temp = s2[int((j + t + len(s2)) % len(s2))]
			m += temp
			f = 1
			break
	if f == 1:
		continue
	for j in range(0, len(s3)):
		if s[i] == s3[j]:
			temp = s3[int((j + t + len(s3)) % len(s3))]
			m += temp
			f = 1
			break
print(m[1:])


import sys
from math import *

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())
d = minp()
if d == 'R':
	x = -1
else:
	x = 1
m = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in minp():
	z = m.find(i)
	z += x
	print(m[z], end='')


rl = input().strip()
line = input().strip()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if rl == 'R':
	rl = -1
else:
	rl = 1
res = ''
for i in range(0, len(line)):
	res = res + keyboard[keyboard.find(line[i]) + rl]
print(res)


k = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
d = input()
s = input()
r = ''
for c in s:
	for i in range(3):
		for j in range(10):
			if c == k[i][j]:
				r += k[i][j - 1] if d == 'R' else k[i][j + 1]
				break
print(r)


def translate(s, LR):
	saida = ''
	dici = list('qwertyuiopasdfghjkl;zxcvbnm,./')
	for i in range(len(s)):
		if LR == 'L':
			saida = saida + dici[dici.index(s[i]) + 1]
		if LR == 'R':
			saida = saida + dici[dici.index(s[i]) - 1]
	return saida
L = input()
s = input()
print(translate(s, L))


L_R = str(input())
string = list(str(input()))
r = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = list(r)
for i in range(len(string)):
	index = r.find(string[i])
	if L_R == 'R':
		string[i] = c[index - 1]
	else:
		string[i] = c[index + 1]
print(str(''.join(string)))


s = input()
sentence = input()
ans = ''
for i in sentence:
	(prev, flag) = ('', 0)
	for j in 'qwertyuiopasdfghjkl;zxcvbnm,./':
		if flag == 1:
			break
		if i == j:
			if s == 'R':
				break
			else:
				flag = 1
		prev = j
	if s == 'R':
		ans += prev
	else:
		ans += j
print(ans)


keyboard = list('qwertyuiopasdfghjkl;zxcvbnm,./')

def original_text(direction, s):
	ans = []
	for char in s:
		ans.append(keyboard[keyboard.index(char) + (-1 if direction == 'R' else 1)])
	return ''.join(ans)
direction = input()
s = input()
print(original_text(direction, s))


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direct = input()
strin = input()
xs = []
if direct == 'R':
	i = -1
else:
	i = 1
for ch in strin:
	xs.append(keyboard[keyboard.find(ch) + i])
print(''.join(xs))


r = {'q': 'q', 'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', '[': 'p', 'a': 'a', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'z': 'z', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.', "'": ';', ']': '[', '\\': ']'}
l = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'p': '[', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', '[': ']', ']': '\\', ';': "'", ',': '.', '.': '/'}
side = input()
word = input()
b = ''
if side == 'R':
	for i in word:
		b = b + r[i]
elif side == 'L':
	for i in word:
		b = b + l[i]
print(b)


def mensaje(direccion, tex):
	mensaje = []
	teclado1 = 'qwertyuiop'
	teclado2 = 'asdfghjkl;'
	teclado3 = 'zxcvbnm,./'
	if direccion == 'R' or direccion == 'r':
		for i in tex:
			if i == 'q' or i == 'a' or i == 'z':
				mensaje.append(i)
			else:
				flag = 0
				while flag == 0:
					for j in range(len(teclado1)):
						if i == teclado1[j]:
							mensaje.append(teclado1[j - 1])
							flag = flag + 1
					for k in range(len(teclado2)):
						if i == teclado2[k]:
							mensaje.append(teclado2[k - 1])
							flag = flag + 1
					for h in range(len(teclado3)):
						if i == teclado3[h]:
							mensaje.append(teclado3[h - 1])
							flag = flag + 1
	if direccion == 'L' or direccion == 'l':
		for i in tex:
			if i == 'p' or i == ';' or i == '/':
				mensaje.append(i)
			else:
				flag = 0
				while flag == 0:
					for j in range(len(teclado1)):
						if i == teclado1[j]:
							mensaje.append(teclado1[j + 1])
							flag = flag + 1
					for k in range(len(teclado2)):
						if i == teclado2[k]:
							mensaje.append(teclado2[k + 1])
							flag = flag + 1
					for h in range(len(teclado3)):
						if i == teclado3[h]:
							mensaje.append(teclado3[h + 1])
							flag = flag + 1
	return mensaje

def main():
	direccion = input()
	tex = input()
	mensaje1 = mensaje(direccion, tex)
	for i in range(len(mensaje1)):
		print(mensaje1[i], end='')
main()


k = list('qwertyuiopasdfghjkl;zxcvbnm,./')
s = input()
st = list(input())
if s == 'L':
	for i in range(len(st)):
		st[i] = k[k.index(st[i]) + 1]
else:
	for i in range(len(st)):
		st[i] = k[k.index(st[i]) - 1]
print(''.join(st))


t = 'qwertyuiopasdfghjkl;zxcvbnm,./ '
d = -1 if input() == 'R' else 1
t = {t[i]: t[i + d] for i in range(30)}
print(''.join((t[i] for i in input())))


inp = str('qwertyuiopasdfghjkl;zxcvbnm,./')
ls = list(inp)
out = []
side = input()
inp1 = input()
ls1 = list(inp1)
if side == 'R':
	for i in range(len(ls1)):
		for j in range(1, len(ls)):
			if ls1[i] == ls[j]:
				out.append(ls[j - 1])
else:
	for i in range(len(ls1)):
		for j in range(len(ls) - 1):
			if ls1[i] == ls[j]:
				out.append(ls[j + 1])
st = ''.join(out)
print(st)


def main():
	v = -1 if input() == 'R' else 1
	table = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	s = input()
	t = ''.join([table[table.find(x) + v] for x in s])
	print(t)
main()


KEYBOARD = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']

def decode(direction, text, keyboard=KEYBOARD):
	if direction == 'L':
		direction = 1
	else:
		direction = -1
	keyboard_array = [list(x) for x in keyboard]
	for char in text:
		flag = False
		for line in keyboard_array:
			for (idx, letter) in enumerate(line):
				if letter == char:
					print(line[idx + direction], end='')
					flag = True
					break
			if flag == True:
				break
direction = input()
text = input()
decode(direction, text)


n = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
k = 0
z = ''
for i in x:
	if n == 'R':
		k = s.index(i)
		z += s[k - 1]
	else:
		k = s.index(i)
		z += s[k + 1]
print(z)


def shift(s, c):
	if c == 'R':
		for j in l:
			if s in j:
				print(j[j.index(s) - 1], end='')
	if c == 'L':
		for j in l:
			if s in j:
				print(j[j.index(s) + 1], end='')
l = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
c = input()
s = input()
for i in s:
	shift(i, c)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
s1 = list(s1)
s2 = list(s2)
s3 = list(s3)
a = input()
s = input()
s = list(s)
l = []
if a == 'R':
	for i in range(len(s)):
		for j in range(10):
			if s[i] == s1[j]:
				l.append(s1[j - 1])
			elif s[i] == s2[j]:
				l.append(s2[j - 1])
			elif s[i] == s3[j]:
				l.append(s3[j - 1])
	print(''.join(l))
else:
	for i in range(len(s)):
		for j in range(10):
			if s[i] == s1[j]:
				l.append(s1[j + 1])
			elif s[i] == s2[j]:
				l.append(s2[j + 1])
			elif s[i] == s3[j]:
				l.append(s3[j + 1])
	print(''.join(l))


keyboard = 'q w e r t y u i o p a s d f g h j k l ; z x c v b n m , . /'.split()
n = input()
encrypted_text = input()
plaintext = ''
for char in encrypted_text:
	if n == 'R':
		plaintext += keyboard[keyboard.index(char) - 1]
		continue
	else:
		plaintext += keyboard[keyboard.index(char) + 1]
print(plaintext)


s = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
ans = []
d = -1 if input() == 'R' else 1
t = input()
for x in t:
	for i in range(3):
		for j in range(10):
			if s[i][j] == x:
				ans.append(s[i][j + d])
print(*ans, sep='')


x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
m = input()
n = input()
z = 0
l = []
while z < len(n):
	if m == 'L':
		l.append(x[x.find(n[z]) + 1])
	else:
		l.append(x[x.find(n[z]) - 1])
	z += 1
h = 0
while h < len(l):
	print(l[h], end='')
	h += 1


def main():
	side_shift = input()
	raw_message = input()
	keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	shift = 0
	if side_shift == 'R':
		shift = -1
	else:
		shift = 1
	result_message = ''
	for letter in raw_message:
		result_message += keyboard[keyboard.index(letter) + shift]
	print(result_message)
main()


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = 2 * (input() == 'L') - 1
s = input()
ans = ''
for c in s:
	ans += keyboard[keyboard.index(c) + shift]
print(ans)


a = input()
b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = input()
for i in s:
	print(b[b.index(i) + [-1, 1][a == 'L']], end='')


A = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
for i in range(3):
	A[i] = list(A[i])
m = ''
if input() == 'R':
	s = input()
	for c in s:
		for a in A:
			if c in a:
				m += a[a.index(c) - 1]
else:
	s = input()
	for c in s:
		for a in A:
			if c in a:
				m += a[a.index(c) + 1]
print(m)


di = input()
s = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
if di == 'R':
	x = -1
else:
	x = 1
new_s = ''
for c in s:
	flag = False
	for i in range(len(s1)):
		if s1[i] == c:
			new_s += s1[i + x]
			flag = True
	if not flag:
		for i in range(len(s2)):
			if s2[i] == c:
				new_s += s2[i + x]
				flag = True
	if not flag:
		for i in range(len(s3)):
			if s3[i] == c:
				new_s += s3[i + x]
				flag = True
print(new_s)


d = input()[:1]
s = input()
res = ''
rv = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'L':
	for i in range(len(s)):
		res += rv[rv.index(s[i]) + 1]
else:
	for i in range(len(s)):
		res += rv[rv.index(s[i]) - 1]
print(res)


n = input()
s = input()
s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s2 = ''
for i in range(len(s)):
	k = s1.find(s[i])
	if n == 'R':
		s2 = s2 + s1[k - 1]
	else:
		s2 = s2 + s1[k + 1]
print(s2)


p = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
s = input()
k = 1
if n[0] == 'R':
	k = -1
ss = ''
for i in s:
	ss += p[p.find(i) + k]
print(ss)


q = ['qwertyuiopasdfghjkl;zxcvbnm,./']
z = input()
x = input()
word = []
for i in x:
	if z.lower() == 'l':
		word += q[0][q[0].index(i) + 1]
	else:
		word += q[0][q[0].index(i) - 1]
print(*word, sep='')


d = input()
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for c in input():
	print(l[l.index(c) + [1, -1][d == 'R']], end='')


n = input()
ipt = input()
tmp = 'qwertyuiopasdfghjkl;zxcvbnm,./'
f = -1 if n == 'R' else 1
for i in ipt:
	print(tmp[tmp.index(i) + f], end='')


keys = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
if input() == 'R':
	a = -1
else:
	a = 1
for i in input():
	if i in keys[0]:
		b = 0
	elif i in keys[1]:
		b = 1
	else:
		b = 2
	c = keys[b].index(i)
	print(keys[b][c + a], end='')


d = input()
s = input()
Q = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
for i in range(0, len(s)):
	if d == 'R':
		s = s[:i] + Q[Q.find(s[i]) - 1] + s[i + 1:]
	else:
		s = s[:i] + Q[Q.find(s[i]) + 1] + s[i + 1:]
print(s)


f = input()
mes = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = 1
if f == 'L':
	x = -1
for i in mes:
	print(s[s.find(i) - x], end='')


t = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = list(a)
if t == 'R':
	s = input()
	a1 = []
	for i in s:
		d = a.index(i)
		a1.append(a[d - 1])
	s1 = ''.join(map(str, a1))
	print(s1)
else:
	s = input()
	a1 = []
	for i in s:
		d = a.index(i)
		a1.append(a[d + 1])
	s1 = ''.join(map(str, a1))
	print(s1)


a = input()
s = ''
b = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
c = list(input())
if a == 'L':
	for i in range(len(c)):
		c[i] = b[b.index(c[i]) + 1]
	for i in range(len(c)):
		s = s + c[i]
else:
	for i in range(len(c)):
		c[i] = b[b.index(c[i]) - 1]
	for i in range(len(c)):
		s = s + c[i]
print(s)


from sys import stdout
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'

def translateKeyboard(mode, word):
	traversal = range(0, len(keyboard)) if mode == 'R' else range(len(keyboard) - 1, -1, -1)
	moveAmount = -1 if mode == 'R' else 1
	for i in traversal:
		translate = i + moveAmount
		c = keyboard[i]
		cc = keyboard[translate] if translate > -1 and translate < len(keyboard) else c
		word = word.replace(c, cc)
	return word
out = translateKeyboard(input(), input())
stdout.write(out)


def R(key, i):
	x = key.index(i)
	return key[x + 1]

def L(key, i):
	x = key.index(i)
	return key[x - 1]
RL = input()
s = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if RL == 'R':
	for i in s:
		print(L(key, i), end='')
else:
	for i in s:
		print(R(key, i), end='')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	d = S()
	s = S()
	t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	r = ''
	k = 1
	if d == 'R':
		k = -1
	for c in s:
		i = t.index(c)
		r += t[i + k]
	return r
print(main())


import math
k = input()
s = input()
q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = list(s)
for i in range(len(s)):
	if k == 'L':
		s[i] = q[q.index(s[i]) + 1]
	elif k == 'R':
		s[i] = q[q.index(s[i]) - 1]
print(''.join(list(map(str, s))))


p = input()
q = input()
lst = list('qwertyuiop' + 'asdfghjkl;' + 'zxcvbnm,./')
for i in range(len(q)):
	t = lst.index(q[i])
	if p == 'L':
		print(lst[t + 1], end='')
	else:
		print(lst[t - 1], end='')


fi = 'qwertyuiop'
se = 'asdfghjkl;'
th = 'zxcvbnm,./'
bar = input()
foo = input()
if bar is 'R':
	for e in foo:
		if e in fi:
			print(fi[fi.index(e) - 1], end='')
		elif e in se:
			print(se[se.index(e) - 1], end='')
		else:
			print(th[th.index(e) - 1], end='')
else:
	for e in foo:
		if e in fi:
			print(fi[fi.index(e) + 1], end='')
		elif e in se:
			print(se[se.index(e) + 1], end='')
		else:
			print(th[th.index(e) + 1], end='')


direction = input()
string_keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
false_input = input()
if direction == 'L':
	for i in false_input:
		pos = string_keyboard.index(i)
		print(string_keyboard[pos + 1], end='')
else:
	for i in false_input:
		pos = string_keyboard.index(i)
		print(string_keyboard[pos - 1], end='')


p = input()
a = input()
d = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if p == 'R':
	for i in a:
		w = d.index(i) - 1
		ans += d[w]
else:
	for i in a:
		w = d.index(i) + 1
		ans += d[w]
print(ans)


line1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
line2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
line3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
direction = input()
word = input()
real_word = ''
if direction == 'R':
	for letter in word:
		if letter in line1:
			position = line1.index(letter) - 1
			real_word = real_word + line1[position]
		elif letter in line2:
			position = line2.index(letter) - 1
			real_word = real_word + line2[position]
		elif letter in line3:
			position = line3.index(letter) - 1
			real_word = real_word + line3[position]
if direction == 'L':
	for letter in word:
		if letter in line1:
			position = line1.index(letter) + 1
			real_word = real_word + line1[position]
		elif letter in line2:
			position = line2.index(letter) + 1
			real_word = real_word + line2[position]
		elif letter in line3:
			position = line3.index(letter) + 1
			real_word = real_word + line3[position]
print(real_word)


row_1 = 'qwertyuiop'
row_2 = 'asdfghjkl;'
row_3 = 'zxcvbnm,./'
s = input()
t = input()
result = ''
r = 0
for i in t:
	if i in row_1:
		r = row_1.find(i)
		if s == 'L':
			result += row_1[r + 1]
		else:
			result += row_1[r - 1]
	if i in row_2:
		r = row_2.find(i)
		if s == 'L':
			result += row_2[r + 1]
		else:
			result += row_2[r - 1]
	if i in row_3:
		r = row_3.find(i)
		if s == 'L':
			result += row_3[r + 1]
		else:
			result += row_3[r - 1]
print(result)


s = input()
st = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
l = []
if s == 'R':
	for i in st:
		if i in s1:
			ix = s1.index(i)
			l.append(s1[ix - 1])
		elif i in s2:
			ix = s2.index(i)
			l.append(s2[ix - 1])
		else:
			ix = s3.index(i)
			l.append(s3[ix - 1])
else:
	for i in st:
		if i in s1:
			ix = s1.index(i)
			l.append(s1[ix + 1])
		elif i in s2:
			ix = s2.index(i)
			l.append(s2[ix + 1])
		else:
			ix = s3.index(i)
			l.append(s3[ix + 1])
print(''.join(l))


shift = input()
word_original = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
forward = str.maketrans(keyboard, keyboard[1:] + keyboard[0])
backward = str.maketrans(keyboard[1:] + keyboard[0], keyboard)
if shift == 'L':
	word_corrected = word_original.translate(forward)
else:
	word_corrected = word_original.translate(backward)
print(word_corrected)


d = input()
s = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = -1 if d == 'R' else 1
print(''.join((k[(k.index(c) + shift) % len(k)] for c in s)))


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
if a == 'R':
	z = -1
else:
	z = 1
q = input()
w = ''
for i in range(len(q)):
	d = s.index(q[i])
	w += s[d + z]
print(w)


l = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
c = input()
s = input()
len = len(s)
n = ''
if c is 'R':
	for i in range(0, len):
		for j in range(0, 30):
			if s[i] == l[j]:
				item = l[j - 1]
				n = n + item
else:
	for i in range(0, len):
		for j in range(0, 30):
			if s[i] == l[j]:
				item = l[j + 1]
				n = n + item
print(n)


n = input()
a = input()
str1 = 'qwertyuiop'
str2 = 'asdfghjkl;'
str3 = 'zxcvbnm,./'
cont = ''
if n == 'R':

	def shift(string, elem):
		ind = string.find(elem)
		new_elem = string[ind - 1]
		return new_elem
else:

	def shift(string, elem):
		ind = string.find(elem)
		new_elem = string[ind + 1]
		return new_elem
for i in a:
	if str1.find(i) != -1:
		cont += shift(str1, i)
	elif str2.find(i) != -1:
		cont += shift(str2, i)
	else:
		cont += shift(str3, i)
print(cont)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = [-1, 1][input() == 'L']
s = input()
for c in s:
	i = keyboard.index(c)
	print(keyboard[i + d], end='')


import sys
import math
input = sys.stdin.readline

def int_array():
	return list(map(int, input().split()))

def str_array():
	return list(map(str, input().split()))
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
keys = list(s)
direction = input().strip()
word = input().strip()
if direction == 'R':
	off = -1
else:
	off = +1
for i in word:
	d = keys.index(i) + off
	print(keys[d], end='')


dictionary = list('qwertyuiopasdfghjkl;zxcvbnm,./')
n = input()
sequence = list(input())
for i in range(len(sequence)):
	if n == 'R':
		print(dictionary[dictionary.index(sequence[i]) - 1], end='')
	elif n == 'L':
		print(dictionary[dictionary.index(sequence[i]) + 1], end='')


n = input()
s = input()
S1 = 'qwertyuiop'
S2 = 'asdfghjkl;'
S3 = 'zxcvbnm,./'
k = 0
s_mod = ''
if n == 'R':
	for c in s:
		if c in S1:
			for i in range(len(S1)):
				if c != S1[i]:
					k += 1
				else:
					s_mod += S1[k - 1]
					k = 0
					break
		if c in S2:
			for i in range(len(S2)):
				if c != S2[i]:
					k += 1
				else:
					s_mod += S2[k - 1]
					k = 0
					break
		if c in S3:
			for i in range(len(S3)):
				if c != S3[i]:
					k += 1
				else:
					s_mod += S3[k - 1]
					k = 0
					break
if n == 'L':
	for c in s:
		if c in S1:
			for i in range(len(S1)):
				if c != S1[i]:
					k += 1
				else:
					s_mod += S1[k + 1]
					k = 0
					break
		if c in S2:
			for i in range(len(S2)):
				if c != S2[i]:
					k += 1
				else:
					s_mod += S2[k + 1]
					k = 0
					break
		if c in S3:
			for i in range(len(S3)):
				if c != S3[i]:
					k += 1
				else:
					s_mod += S3[k + 1]
					k = 0
					break
print(s_mod)


dc1 = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/'}
new_dict = {v: k for (k, v) in dc1.items()}
w = input()
s = input()
q = ''
if w == 'L':
	for i in range(0, len(s)):
		q += dc1[s[i]]
	print(q)
else:
	for i in range(0, len(s)):
		q += new_dict[s[i]]
	print(q)


orient = input()
key = input()
keyboard = 'poiuytrewq;lkjhgfdsa/.,mnbvcxz'
ans = ''
for i in range(len(key)):
	if orient == 'R':
		ans += keyboard[keyboard.find(key[i]) + 1]
	elif orient == 'L':
		ans += keyboard[keyboard.find(key[i]) - 1]
print(ans)


line = [list('qwertyuiop'), list('asdfghjkl;'), list('zxcvbnm,./')]
check = input()
word = list(input())
final = []

def checkline(letter):
	if letter in line[0]:
		return 0
	elif letter in line[1]:
		return 1
	else:
		return 2

def shift(direction, letter):
	dir = direction
	a = checkline(letter)
	wordcount = 0
	for i in line[a]:
		if i is letter:
			break
		else:
			wordcount += 1
	if wordcount == 9 and dir == 1:
		return line[a][9]
	elif wordcount == 0 and dir == -1:
		return line[a][0]
	else:
		return line[a][wordcount + dir]
if check == 'L':
	for i in word:
		final.append(shift(1, i))
else:
	for i in word:
		final.append(shift(-1, i))
print(''.join(final))


n = 1 if input() == 'L' else -1
a = list('qwertyuiopasdfghjkl;zxcvbnm,./')
for i in list(input()):
	print(a[a.index(i) + n], end='')
print()


f = 'q w e r t y u i o p p'.split()
s = 'a s d f g h j k l ; ;'.split()
t = 'z x c v b n m , . / /'.split()
move = input()
if move == 'R':
	move = -1
else:
	move = 1
text = input()
for i in range(len(text)):
	if text[i] in f:
		print(f[max(f.index(text[i]) + move, 0)], end='')
		continue
	if text[i] in s:
		print(s[max(s.index(text[i]) + move, 0)], end='')
		continue
	if text[i] in t:
		print(t[max(t.index(text[i]) + move, 0)], end='')
		continue
print()


def answer(dir, s):
	KEYBOARD = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	new_s = ''
	if dir == 'R':
		for c in s:
			new_s = new_s + KEYBOARD[KEYBOARD.find(c) - 1]
	if dir == 'L':
		for c in s:
			new_s = new_s + KEYBOARD[KEYBOARD.find(c) + 1]
	return new_s

def main():
	dir = input()
	s = input()
	print(answer(dir, s))
main()


napr = input()
if napr == 'R':
	napr = -1
else:
	napr = 1
s = []
t_t = ''
s += ['qwertyuiop']
s += ['asdfghjkl;']
s += ['zxcvbnm,./']
text = input()
for u in range(len(text)):
	for h in range(len(s)):
		if text[u] in s[h]:
			y = s[h].index(text[u]) + napr
			t_t += s[h][y]
print(t_t)


def find(l, x):
	a = -1
	for i in l:
		a += 1
		if i == x:
			return a
l1 = list('qwertyuiop')
l2 = list('asdfghjkl;')
l3 = list('zxcvbnm,./')
rol = input()
s = input()
ans = ''
for d in s:
	if rol == 'R':
		rolp = -1
	if rol == 'L':
		rolp = 1
	if d in l1:
		l = l1
	if d in l2:
		l = l2
	if d in l3:
		l = l3
	ans += l[find(l, d) + rolp]
print(ans)


t = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=']
u = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\\']
v = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'"]
z = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
x = input()
o = input()
e = ''
if x == 'R':
	for i in range(len(o)):
		if o[i] in t:
			e += t[t.index(o[i]) - 1]
		elif o[i] in u:
			e += u[u.index(o[i]) - 1]
		elif o[i] in v:
			e += v[v.index(o[i]) - 1]
		elif o[i] in z:
			e += z[z.index(o[i]) - 1]
elif x == 'L':
	for i in range(len(o)):
		if o[i] in t:
			e += t[t.index(o[i]) + 1]
		elif o[i] in u:
			e += u[u.index(o[i]) + 1]
		elif o[i] in v:
			e += v[v.index(o[i]) + 1]
		elif o[i] in z:
			e += z[z.index(o[i]) + 1]
print(e)


def get_original_message_from(message, direction_index):
	mole_original_message = ''
	for i in range(len(mole_message)):
		mole_original_message += keyboard[keyboard.index(mole_message[i]) + direction_index]
	return mole_original_message
direction = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
mole_message = input()
ans = ''
if direction == 'R':
	ans = get_original_message_from(mole_message, -1)
else:
	ans = get_original_message_from(mole_message, +1)
print(ans)


u_keybord = 'qwertyuiop'
m_keybord = 'asdfghjkl;'
l_keybord = 'zxcvbnm,./'

def s(k, shift, a):
	if shift == 'R':
		if k.find(a) == 0:
			return a
		else:
			return k[k.find(a) - 1]
	if shift == 'L':
		if k.find(a) == len(k) - 1:
			return a
		else:
			return k[k.find(a) + 1]
shift = input()
msg = input()
result = ''
for i in msg:
	if i in u_keybord:
		result += s(u_keybord, shift, i)
	elif i in m_keybord:
		result += s(m_keybord, shift, i)
	else:
		result += s(l_keybord, shift, i)
print(result)


def func(letter, sentido):
	string = 'qwertyuiop\n    asdfghjkl;\n    zxcvbnm,./'
	if sentido == 'R':
		return string[string.index(letter) - 1]
	else:
		return string[string.index(letter) + 1]
sentido = input()
string = input()
for l in string:
	print(func(l, sentido), end='')


kl = 'qwertyuiopasdfghjkl;zxcvbnm,./'
flag = input()
word = input()
if flag == 'R':
	for i in word:
		print(kl[kl.index(i) - 1], end='')
elif flag == 'L':
	for i in word:
		print(kl[kl.index(i) + 1], end='')


b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
i = input()
a = input()
c = (1, -1)[i == 'R']
for j in a:
	print(b[b.index(j) + c], end='')


s = input()
li = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
a = input()
ans = ''
if s == 'R':
	for i in a:
		if i in li[0]:
			ans += li[0][li[0].index(i) - 1]
		elif i in li[1]:
			ans += li[1][li[1].index(i) - 1]
		elif i in li[2]:
			ans += li[2][li[2].index(i) - 1]
else:
	for i in a:
		if i in li[0]:
			ans += li[0][li[0].index(i) + 1]
		elif i in li[1]:
			ans += li[1][li[1].index(i) + 1]
		elif i in li[2]:
			ans += li[2][li[2].index(i) + 1]
print(ans)


f = input()
e = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
d = []
if f == 'R':
	for letter in e:
		if letter in a:
			i = a.find(letter)
			d.append(a[i - 1])
		if letter in b:
			i = b.find(letter)
			d.append(b[i - 1])
		if letter in c:
			i = c.find(letter)
			d.append(c[i - 1])
	string = ''
	for i in range(len(e)):
		string += d[i]
	print(string)
if f == 'L':
	for letter in e:
		if letter in a:
			i = a.find(letter)
			d.append(a[i + 1])
		if letter in b:
			i = b.find(letter)
			d.append(b[i + 1])
		if letter in c:
			i = c.find(letter)
			d.append(c[i + 1])
	string = ''
	for i in range(len(e)):
		string += d[i]
	print(string)


text = "qwertyuiop[asdfghjkl;'zxcvbnm,./"
im = input()
str = input()
if im == 'R':
	for i in str:
		print(text[text.index(i) - 1], end='')
else:
	for i in str:
		print(text[text.index(i) + 1], end='')


cmd = input()
s = input()
d = {}
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if cmd == 'R':
	for i in range(1, len(a), 1):
		d[a[i]] = a[i - 1]
if cmd == 'L':
	for i in range(0, len(a) - 1, 1):
		d[a[i]] = a[i + 1]
for i in s:
	print(d[i], end='')


d = input()
l = input()
k = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
r = []
if d == 'R':
	for i in range(len(l)):
		flag = 0
		for j in range(3):
			for y in range(len(k[j])):
				if l[i] == k[j][y]:
					r.append(k[j][y - 1])
					flag = 1
					break
			if flag == 1:
				break
else:
	for i in range(len(l)):
		flag = 0
		for j in range(3):
			for y in range(len(k[j])):
				if l[i] == k[j][y]:
					r.append(k[j][y + 1])
					flag = 1
					break
			if flag == 1:
				break
r = ''.join(r)
print(r)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
l = input()
s = input()
ns = ''
if l == 'R':
	x = -1
else:
	x = 1
for i in range(len(s)):
	if s[i] in s1:
		ns += s1[s1.find(s[i]) + x]
	elif s[i] in s2:
		ns += s2[s2.find(s[i]) + x]
	elif s[i] in s3:
		ns += s3[s3.find(s[i]) + x]
print(ns)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
i = input
d = [-1, 1][i() < 'R']
for c in i():
	print(a[a.find(c) + d], end='')


if input() == 'L':
	dire = 1
else:
	dire = -1
mes = input()
kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
origin = ''
for i in range(len(mes)):
	origin += kb[kb.index(mes[i]) + dire]
print(origin)


shift = [1, -1][input() == 'R']
message = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
print(''.join([keyboard[keyboard.index(m) + shift] for m in message]))


l = input().upper()
s = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = ''
for i in s:
	if l == 'R':
		b += a[a.find(i) - 1]
	else:
		b += a[a.find(i) + 1]
print(b)


rl = input()
vvod = input()
ans = ''
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if rl == 'R':
	for i in range(len(vvod)):
		ans += a[a.find(vvod[i]) - 1]
elif rl == 'L':
	for i in range(len(vvod)):
		ans += a[a.find(vvod[i]) + 1]
print(ans)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
s = input()
l = len(s)
z = ''
c = 0
if d == 'R':
	for n in range(l):
		for t in range(30):
			if a[t] != s[n]:
				c = c + 1
			elif a[t] == s[n]:
				z = z + a[t - 1]
				break
	print(z)
elif d == 'L':
	for n in range(l):
		for t in range(30):
			if a[t] != s[n]:
				c = c + 1
			elif a[t] == s[n]:
				z = z + a[t + 1]
				break
	print(z)


d = input()
s = input()
k = list('qwertyuiopasdfghjkl;zxcvbnm,./')
w = []
for i in s:
	if d == 'L':
		w.append(k[k.index(i) + 1])
	else:
		w.append(k[k.index(i) - 1])
print(''.join(w))


g = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
b = input()
c = ''
for i in range(len(b)):
	if a == 'R':
		c += g[g.index(b[i]) - 1]
	elif a == 'L':
		c += g[g.index(b[i]) + 1]
print(c)


shift = input()
string = input()
length = len(string)
key = []
keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if shift == 'R':
	for i in range(0, length, 1):
		for j in range(0, 30, 1):
			if string[i] != keyboard[j]:
				continue
			else:
				key.append(keyboard[j - 1])
elif shift == 'L':
	for i in range(0, length, 1):
		for j in range(0, 30, 1):
			if string[i] != keyboard[j]:
				continue
			else:
				key.append(keyboard[j + 1])
print(''.join(key))


KEYS = 'qwertyuiopasdfghjkl;zxcvbnm,./'
L = {ch1: ch2 for (ch1, ch2) in zip(KEYS, KEYS[1:])}
R = {ch1: ch2 for (ch1, ch2) in zip(KEYS[1:], KEYS)}
shift = input()
for ch in input():
	print(eval(shift + '[ch]'), end='')


n = input()
m = list(input())
a = "qwertyuiop[]\\asdfghjkl;'zxcvbnm,./"
l = list(a)
if n == 'R':
	for i in range(len(m)):
		c = a.find(m[i])
		m[i] = l[c - 1]
else:
	for i in range(len(m)):
		c = a.find(m[i])
		m[i] = l[c + 1]
print(''.join(m))


f = 'qwertyuiop'
s = 'asdfghjkl;'
l = 'zxcvbnm,./'
letter = input()
t = input()
if letter == 'R':
	for i in t:
		if i in f:
			j = f.index(i)
			if j == 0:
				pass
			else:
				print(f[j - 1], end='')
		elif i in s:
			j = s.index(i)
			if j == 0:
				pass
			else:
				print(s[j - 1], end='')
		else:
			j = l.index(i)
			if j == 0:
				pass
			else:
				print(l[j - 1], end='')
else:
	for i in t:
		if i in f:
			j = f.index(i)
			if j == 9:
				pass
			else:
				print(f[j + 1], end='')
		elif i in s:
			j = s.index(i)
			if j == 9:
				pass
			else:
				print(s[j + 1], end='')
		else:
			j = l.index(i)
			if j == 9:
				pass
			else:
				print(l[j + 1], end='')


shift = input()
s = input()
keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
change = 0
if shift == 'R':
	change -= 1
else:
	change += 1
answer = ''
for element in s:
	if change == 1 and element == '/':
		answer += 'q'
	else:
		answer += keyboard[keyboard.index(element) + change]
print(answer)


x = input()
y = input()
t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
r = 'wertyuiopqsdfghjkl;axcvbnm,./z'
l = 'pqwertyuio;asdfghjkl/zxcvbnm,.'
s = ''
for i in y:
	if x == 'R':
		d = r.index(i)
		s += t[d]
	else:
		d = l.index(i)
		s += t[d]
print(s)


class Cezar:
	alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'

	def __init__(self, delta, s):
		if delta == 'R':
			self.delta = -1
		else:
			self.delta = 1
		self.s = s

	@property
	def decode(self):
		delta_alpha = Cezar.alpha[self.delta:] + Cezar.alpha[:self.delta]
		table = ''.maketrans(Cezar.alpha, delta_alpha)
		self.s = self.s.translate(table)
		return self.s

	@property
	def encode(self):
		delta_alpha = Cezar.alpha[self.delta:] + Cezar.alpha[:self.delta]
		table = ''.maketrans(delta_alpha, Cezar.alpha)
		self.s = self.s.translate(table)
		return self.s
krotik = Cezar(input(), input())
print(krotik.decode)


direction = input()
wrong_message = input()
keyboard_chars = 'qwertyuiopasdfghjkl;zxcvbnm,./'
correct_message = ''
for letter in wrong_message:
	if direction == 'R':
		correct_message += keyboard_chars[keyboard_chars.index(letter) - 1]
	elif direction == 'L':
		correct_message += keyboard_chars[keyboard_chars.index(letter) + 1]
print(correct_message)


dir = input()
sequence = input()
keys = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
for x in range(len(keys)):
	keys[x] = list(keys[x])
x = -1 if dir == 'R' else 1
for char in sequence:
	for row in range(len(keys)):
		if char in keys[row]:
			break
	print(keys[row][keys[row].index(char) + x], end='')


Direction = input()
Characters = input()
CharLen = len(Characters)
Keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
Output = ''
KeyboardDict = dict()
for x in range(len(Keyboard)):
	KeyboardDict[Keyboard[x]] = x
for y in range(CharLen):
	index = KeyboardDict[Characters[y]]
	if Direction == 'L':
		character = Keyboard[index + 1]
	else:
		character = Keyboard[index - 1]
	Output += character
print(Output)


direction = input()
text = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if direction == 'R':
	for c in text:
		ans += keyboard[keyboard.index(c) - 1]
else:
	for c in text:
		ans += keyboard[keyboard.index(c) + 1]
print(ans)


n = input()
a = input().lower()
if n == 'R':
	n = -1
else:
	n = 1
answer = ''
row1 = 'qwertyuiop'
row2 = 'asdfghjkl;'
row3 = 'zxcvbnm,./'
for i in a:
	if i in row1:
		if -1 < row1.index(i) + n < 10:
			answer += row1[row1.index(i) + n]
		else:
			answer += row1[row1.index(i)]
	elif i in row2:
		if -1 < row2.index(i) + n < 10:
			answer += row2[row2.index(i) + n]
		else:
			answer += row2[row2.index(i)]
	elif -1 < row3.index(i) + n < 10:
		answer += row3[row3.index(i) + n]
	else:
		answer += row3[row3.index(i)]
print(answer)


side = input()
st = input()
k1 = 'qwertyuiop'
k2 = 'asdfghjkl;'
k3 = 'zxcvbnm,./'
ans = ''
si = 1
if side == 'R':
	si = -1
for c in st:
	if c in k1:
		ans += k1[k1.find(c) + si]
	elif c in k2:
		ans += k2[k2.find(c) + si]
	else:
		ans += k3[k3.find(c) + si]
print(ans)


t = 1
while t > 0:
	t -= 1
	s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	l1 = list(s)
	c = input()
	s1 = input()
	l = list(s1)
	ans = ''
	if c == 'R':
		for i in l:
			index = s.find(i)
			ans += l1[index - 1]
	elif c == 'L':
		for i in l:
			index = s.find(i)
			ans += l1[index + 1]
	print(ans)


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
s = input()
if c == 'R':
	for i in s:
		print(k[k.index(i) - 1], end='')
else:
	for i in s:
		print(k[k.index(i) + 1], end='')


sh = input('')
str = input('')
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
shi = 0
if sh == 'R':
	shi = -1
else:
	shi = 1
for i in str:
	if i in s1:
		print(s1[s1.index(i) + shi], end='')
	elif i in s2:
		print(s2[s2.index(i) + shi], end='')
	elif i in s3:
		print(s3[s3.index(i) + shi], end='')


keyboard = list('qwertyuiopasdfghjkl;zxcvbnm,./')
n = input()
s = list(input())
l = []
if n == 'R':
	for i in s:
		x = keyboard.index(i)
		l.append(keyboard[x - 1])
else:
	for i in s:
		x = keyboard.index(i)
		l.append(keyboard[x + 1])
print(''.join(l))


a = 'qwertyuiop[]'
b = "asdfghjkl;'"
c = 'zxcvbnm,./'
lr = input()
s = list(input())
if lr == 'R':
	for i in range(len(s)):
		for j in range(len(a)):
			if s[i] == a[j]:
				s[i] = a[j - 1]
				break
		for j in range(len(b)):
			if s[i] == b[j]:
				s[i] = b[j - 1]
				break
		for j in range(len(c)):
			if s[i] == c[j]:
				s[i] = c[j - 1]
				break
if lr == 'L':
	for i in range(len(s)):
		for j in range(len(a)):
			if s[i] == a[j]:
				s[i] = a[j + 1]
				break
		for j in range(len(b)):
			if s[i] == b[j]:
				s[i] = b[j + 1]
				break
		for j in range(len(c)):
			if s[i] == c[j]:
				s[i] = c[j + 1]
				break
print(''.join(s))


o = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = '!qwertyuio!asdfghjkl!zxcvbnm,.'
r = "wertyuiop[sdfghjkl;'xcvbnm,./!"
e = input()
s = input()
if e == 'R':
	for i in range(len(s)):
		print(o[r.index(s[i])], end='')
else:
	for i in range(len(s)):
		print(o[l.index(s[i])], end='')


sdvig = input()
symb = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
v = ''
for i in symb:
	if sdvig == 'R':
		if s1.find(i) != -1:
			v += s1[s1.find(i) - 1]
		elif s2.find(i) != -1:
			v += s2[s2.find(i) - 1]
		elif s3.find(i) != -1:
			v += s3[s3.find(i) - 1]
	if sdvig == 'L':
		if s1.find(i) != -1:
			v += s1[s1.find(i) + 1]
		elif s2.find(i) != -1:
			v += s2[s2.find(i) + 1]
		elif s3.find(i) != -1:
			v += s3[s3.find(i) + 1]
print(v)


b = input()
s = input()
if b == 'R':
	n = -1
else:
	n = 1
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
S = str()
for i in s:
	if i in s1:
		index = s1.find(i)
		S += s1[index + n]
	elif i in s2:
		index = s2.find(i)
		S += s2[index + n]
	else:
		index = s3.find(i)
		S += s3[index + n]
print(S)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = -1 if input() == 'R' else 1
for i in input():
	print(keyboard[keyboard.index(i) + shift], end='')


m = input('')
a = input('')
e = len(a)
b = 'qwertyuiop'
f = len(b)
c = 'asdfghjkl;'
g = len(c)
d = 'zxcvbnm,./'
h = len(d)
z = ''
if m == 'R':
	for i in range(0, e):
		if a[i] in b:
			for j in range(0, f):
				if b[j] == a[i]:
					z = z + b[j - 1]
					break
		elif a[i] in c:
			for j in range(0, g):
				if c[j] == a[i]:
					z = z + c[j - 1]
					break
		elif a[i] in d:
			for j in range(0, h):
				if d[j] == a[i]:
					z = z + d[j - 1]
					break
if m == 'L':
	for i in range(0, e):
		if a[i] in b:
			for j in range(0, f):
				if b[j] == a[i]:
					z = z + b[j + 1]
					break
		elif a[i] in c:
			for j in range(0, g):
				if c[j] == a[i]:
					z = z + c[j + 1]
					break
		elif a[i] in d:
			for j in range(0, h):
				if d[j] == a[i]:
					z = z + d[j + 1]
					break
print(z)


n = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
snew = input()
if n == 'R':
	for i in snew:
		x = s.index(i)
		print(s[x - 1], end='')
else:
	for i in snew:
		x = s.index(i)
		print(s[x + 1], end='')


keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
shift = input()
message = input()
new = ''
if shift == 'R':
	for i in range(len(message)):
		y = keyboard.index(message[i])
		new += keyboard[y - 1]
else:
	for i in range(len(message)):
		y = keyboard.index(message[i])
		new += keyboard[y + 1]
print(new)


_X0FF = 'qwertyuiopasdfghjkl;zxcvbnm,./'
r = input()
if r == 'R':
	r = -1
else:
	r = 1
st = input()
for i in range(len(st)):
	print(_X0FF[_X0FF.find(st[i]) + r], end='')


keyboard = [j for j in "qwertyuiop[]asdfghjkl;'zxcvbnm,./"]
side = input()
strokes = input()
if side == 'R':
	print(''.join(map(str, [keyboard[keyboard.index(k) - 1] for k in strokes])))
else:
	print(''.join(map(str, [keyboard[keyboard.index(k) + 1] for k in strokes])))


chars = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
s = input()
ans = ''
for i in range(s.__len__()):
	c = s[i]
	index = chars.index(c)
	if shift == 'R':
		ans += chars[index - 1]
	else:
		ans += chars[index + 1]
print(ans)


x = input()
y = input()
n = ''
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if x == 'R':
	for i in y:
		m = k.index(i)
		n = n + k[m - 1]
else:
	for i in y:
		m = k.index(i)
		n = n + k[m + 1]
print(str(n))


dir = input().strip()
message = input().strip()
kb = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
Rvocab = {}
Lvocab = {}
for r in kb:
	n = len(r)
	for i in range(n - 1):
		Rvocab[r[i + 1]] = r[i]
		Lvocab[r[i]] = r[i + 1]
decode = ''
if dir == 'R':
	for ch in message:
		decode += Rvocab[ch]
else:
	for ch in message:
		decode += Lvocab[ch]
print(decode)


string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
keys = []
for i in range(len(string)):
	keys.append(string[i])
direction = input()
text = input()
correct = ''
if direction == 'R':
	for i in range(len(text)):
		correct += keys[keys.index(text[i]) - 1]
else:
	for i in range(len(text)):
		correct += keys[keys.index(text[i]) + 1]
print(correct)


keyboard = [c for c in 'qwertyuiopasdfghjkl;zxcvbnm,./']
c = input()
s = input()
answer = ''
for i in s:
	if c == 'R':
		answer += keyboard[keyboard.index(i) - 1]
	else:
		answer += keyboard[keyboard.index(i) + 1]
print(answer)


klava = 'qwertyuiopasdfghjkl;zxcvbnm,./'
sdvig = input()
if sdvig == 'R':
	delta = -1
else:
	delta = 1
a = list(input())
a = [klava[klava.find(i) + delta] for i in a]
print(''.join(a))


direction = input()
text = input()
if direction == 'R':
	_to = 'qwertyuioasdfghjklzxcvbnm,.'
	_from = 'wertyuiopsdfghjkl;xcvbnm,./'
if direction == 'L':
	_to = 'wertyuiopsdfghjkl;xcvbnm,./'
	_from = 'qwertyuioasdfghjklzxcvbnm,.'
table = text.maketrans(_from, _to)
print(text.translate(table))


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = {s[i]: i for i in range(len(s))}
c = input()
l = list(input())
k = -1 if c == 'R' else 1
for i in range(len(l)):
	l[i] = s[d[l[i]] + k]
print(''.join(l))


d = input()
st = input()
m = 0
if d == 'R':
	m = -1
else:
	m = 1
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
for x in st:
	if x in a:
		print(a[a.find(x) + m], end='')
	elif x in b:
		print(b[b.find(x) + m], end='')
	else:
		print(c[c.find(x) + m], end='')


direction = str(input())
if direction == 'R':
	c = -1
else:
	c = 1
q = 'qwertyuiopasdfghjkl;zxcvbnm,./' * 2
s = str(input())
x = ''
for char in s:
	x += q[q.index(char) + c]
print(x)


row_1 = list(str('qwertyuiopasdfghjkl;zxcvbnm,./'))
t = str(input())
string = list(str(input()))
if t == 'R':
	n = -1
else:
	n = 1
string_2 = []
for i in range(len(string)):
	a = string[i]
	b = row_1.index(a)
	c = row_1[b + n]
	string_2.append(c)
print(''.join(string_2))


d = input()
s = input()
s = list(s)
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = list(a)
c = []
if d == 'R':
	for i in s:
		for x in a:
			if i == x:
				w = a[a.index(x) - 1]
				c.append(w)
			else:
				continue
else:
	for i in s:
		for x in a:
			if i == x:
				w = a[a.index(x) + 1]
				c.append(w)
			else:
				continue
z = ''.join(c)
print(z)


x = input()
y = input().lower()
lst1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
lst2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
lst3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
lst = []
for i in range(len(y)):
	if x == 'R':
		for j in range(len(lst1)):
			if y[i] == lst1[j]:
				lst.append(lst1[j - 1])
			elif y[i] == lst2[j]:
				lst.append(lst2[j - 1])
			elif y[i] == lst3[j]:
				lst.append(lst3[j - 1])
	elif x == 'L':
		for k in range(len(lst1)):
			if y[i] == lst1[k]:
				lst.append(lst1[k + 1])
			elif y[i] == lst2[k]:
				lst.append(lst2[k + 1])
			elif y[i] == lst3[k]:
				lst.append(lst3[k + 1])
print(*lst, sep='')


t = input()
a = input()
b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
pri = ''
if t == 'R':
	for i in a:
		c = b.index(i)
		pri = pri + b[c - 1]
elif t == 'L':
	for i in a:
		c = b.index(i)
		pri = pri + b[c + 1]
print(pri)


z1 = 'qwertyuiop'
z2 = 'asdfghjkl;'
z3 = 'zxcvbnm,./'
a = input()
b = input()
s = ''
for i in range(len(b)):
	if b[i] in z1:
		if a == 'L':
			s += z1[z1.index(b[i]) + 1]
		else:
			s += z1[z1.index(b[i]) - 1]
	elif b[i] in z2:
		if a == 'L':
			s += z2[z2.index(b[i]) + 1]
		else:
			s += z2[z2.index(b[i]) - 1]
	elif a == 'L':
		s += z3[z3.index(b[i]) + 1]
	else:
		s += z3[z3.index(b[i]) - 1]
print(s)


side = input()
check = input()
data = 'qwertyuiopasdfghjkl;zxcvbnm,./'
new_data = ''
for i in check:
	x = data.index(i)
	if side == 'R':
		new_data += data[x - 1]
	else:
		new_data += data[x + 1]
print(new_data)


k = input()
s = list(input())
(x, y, z) = (list('qwertyuiop'), list('asdfghjkl;'), list('zxcvbnm,./'))
v = 1 if k == 'L' else -1
c = [x, y, z]
i = 0
t = ''
while i < len(s):
	if s[i] in x:
		a = x
	if s[i] in y:
		a = y
	if s[i] in z:
		a = z
	a = a[a.index(s[i]) + v]
	t = t + a
	i = i + 1
print(t)


def Main():
	mov = input()
	word = input()
	line1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	ans = ''
	for c in word:
		if mov == 'R':
			ans += line1[line1.find(c) - 1]
		else:
			ans += line1[line1.find(c) + 1]
	print(ans)
Main()


def genMap(m, s):
	l = len(s)
	for i in range(1, l - 1):
		cr = s[i - 1]
		c = s[i]
		cl = s[i + 1]
		print(f'cl={cl},c={c},cr={cr}') if is_debug else ''
		m[c] = {'R': cr, 'L': cl}
	c = s[0]
	cl = s[1]
	m[c] = {'L': cl}
	c = s[l - 1]
	cr = s[l - 2]
	m[c] = {'R': cr}
	return m
is_debug = False
l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
m = {}
m = genMap(m, l1)
m = genMap(m, l2)
m = genMap(m, l3)
print(f'm={m}') if is_debug else ''
print(f"""m["i"]["R"]={m['i']['R']}""") if is_debug else ''
print(f"""m["p"]["R"]={m['p']['R']}""") if is_debug else ''
s1 = input()
s2 = input()
for c in s2:
	print(f'{m[c][s1]}', end='')
print()


d = input()
s = input()
kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	for c in s:
		print(kb[kb.index(c) - 1], end='')
else:
	for c in s:
		print(kb[kb.index(c) + 1], end='')
print()


lr = input()
s = input()
str = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
for i in s:
	for j in range(0, len(str)):
		if i == str[j]:
			if lr == 'R':
				print(str[j - 1], end='')
			else:
				print(str[j + 1], end='')


rl = input()
s = input()
l = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
ans = ''
for f1 in range(len(s)):
	if rl == 'R':
		for f2 in range(len(l)):
			if l[f2] == s[f1]:
				ans += l[f2 - 1]
	if rl == 'L':
		for f2 in range(len(l)):
			if l[f2] == s[f1]:
				ans += l[f2 + 1]
print(ans)


l1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
l2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
l3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
s1 = input()
s2 = input()
l4 = list(s2)
l5 = list()
if s1 == 'R':
	for i in range(len(l4)):
		if l4[i] == 'q' or l4[i] == 'a' or l4[i] == 'z':
			if l4[i] == 'q':
				l5.append(l1[l1.index(l4[i])])
			elif l4[i] == 'a':
				l5.append(l2[l2.index(l4[i])])
			else:
				l5.append(l3[l3.index(l4[i])])
		elif l4[i] in l1:
			l5.append(l1[l1.index(l4[i]) - 1])
		elif l4[i] in l2:
			l5.append(l2[l2.index(l4[i]) - 1])
		else:
			l5.append(l3[l3.index(l4[i]) - 1])
else:
	for i in range(len(l4)):
		if l4[i] == 'p' or l4[i] == ';' or l4[i] == '/':
			if l4[i] == 'p':
				l5.append(l1[l1.index(l4[i])])
			elif l4[i] == ';':
				l5.append(l2[l2.index(l4[i])])
			else:
				l5.append(l3[l3.index(l4[i])])
		elif l4[i] in l1:
			l5.append(l1[l1.index(l4[i]) + 1])
		elif l4[i] in l2:
			l5.append(l2[l2.index(l4[i]) + 1])
		else:
			l5.append(l3[l3.index(l4[i]) + 1])
s2 = ''.join(l5)
print(s2)


shift = input()
wrote = input()
code = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = list()
if shift == 'L':
	for i in wrote:
		ans.append(code[code.index(i) + 1])
elif shift == 'R':
	for i in wrote:
		ans.append(code[code.index(i) - 1])
else:
	exit(100500)
print(''.join(ans))


RoS = input()
sen = list(input())
list0 = list('qwertyuiopasdfghjkl;zxcvbnm,./')
if RoS == 'R':
	for i in range(len(sen)):
		sen[i] = list0[list0.index(sen[i]) - 1]
else:
	for i in range(len(sen)):
		sen[i] = list0[list0.index(sen[i]) + 1]
print(''.join(sen))


dict1 = {'q': 'q', 'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 'a': 'a', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'z': 'z', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
dict2 = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'p': 'p', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', ';': ';', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/', '/': '/'}
v1 = []
s1 = input()
s2 = input()
if s1 == 'R':
	for i in range(len(s2)):
		v1.append(dict1[s2[i]])
else:
	for i in range(len(s2)):
		v1.append(dict2[s2[i]])
print(''.join(v1))


(s, shift) = ('qwertyuiopasdfghjkl;zxcvbnm,./', 1 if input().strip() == 'R' else -1)
print(''.join((s[s.find(c) - shift] for c in input().strip())))


direction = input()
message = input()
Keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for char in message:
	index = Keyboard.index(char)
	if direction == 'L':
		index += 1
	else:
		index -= 1
	print(Keyboard[index], end='')


x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
y = ''.join(reversed(list(x)))
a = input()
b = input()
if a == 'R':
	for i in range(1, len(x)):
		b = b.replace(x[i], x[i - 1])
if a == 'L':
	for i in range(1, len(x)):
		b = b.replace(y[i], y[i - 1])
print(b)


k_1 = 'qwertyuiop'
k_2 = 'asdfghjkl;'
k_3 = 'zxcvbnm,./'
err_type = input()
word = input()
if err_type == 'R':
	flow = -1
else:
	flow = 1
new_word = ''
for i in range(len(word)):
	if word[i] in k_1:
		new_word = new_word + k_1[k_1.index(word[i]) + flow]
	elif word[i] in k_2:
		new_word = new_word + k_2[k_2.index(word[i]) + flow]
	elif word[i] in k_3:
		new_word = new_word + k_3[k_3.index(word[i]) + flow]
print(new_word)


command = input()
s = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if command == 'R':
	for i in s:
		print(keyboard[keyboard.index(i) - 1], end='')
else:
	for i in s:
		print(keyboard[keyboard.index(i) + 1], end='')


a = str(input())
type = str(input())
row1 = 'qwertyuiop'
row2 = 'asdfghjkl;'
row3 = 'zxcvbnm,./'
answer = ''
if a == 'R':
	for i in range(len(type)):
		if type[i] in row1:
			b = row1.index(type[i])
			if b != 0:
				answer += row1[b - 1]
			else:
				answer += row1[0]
		if type[i] in row2:
			c = row2.index(type[i])
			if c != 0:
				answer += row2[c - 1]
			else:
				answer += row2[0]
		if type[i] in row3:
			d = row3.index(type[i])
			if d != 0:
				answer += row3[d - 1]
			else:
				answer += row3[0]
if a == 'L':
	for i in range(len(type)):
		if type[i] in row1:
			b = row1.index(type[i])
			if b != len(row1) - 1:
				answer += row1[b + 1]
			else:
				answer += row1[len(type) - 1]
		if type[i] in row2:
			c = row2.index(type[i])
			if c != len(row2) - 1:
				answer += row2[c + 1]
			else:
				answer += row2[len(type) - 1]
		if type[i] in row3:
			d = row3.index(type[i])
			if d != len(row3) - 1:
				answer += row3[d + 1]
			else:
				answer += row3[len(type) - 1]
print(answer)


z = 'qwertyuiop'
a = 'asdfghjkl;'
b = 'zxcvbnm,./'
v = input()
if v == 'R':
	zz = -1
else:
	zz = 1
u = input()
x = ''
for i in range(len(u)):
	if u[i] in z:
		j = z.index(u[i])
		x = x + z[j + zz]
	elif u[i] in a:
		j = a.index(u[i])
		x = x + a[j + zz]
	elif u[i] in b:
		j = b.index(u[i])
		x = x + b[j + zz]
print(x)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direct = input()
inp = input()
new_str = ''
if direct == 'R':
	for ch in inp:
		new_str += keyboard[keyboard.find(ch) - 1]
else:
	for ch in inp:
		new_str += keyboard[keyboard.find(ch) + 1]
print(new_str)


l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
m = input()
t = ''
if n == 'R':
	for i in m:
		t = t + l[l.index(i) - 1]
else:
	for i in m:
		t = t + l[l.index(i) + 1]
print(t)


board = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
if shift == 'R':
	count = -1
else:
	count = 1
S = input()
ans = ''
for i in S:
	ans += board[board.index(i) + count]
print(ans)


keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
keyDict = dict()
x = 0
for i in keyboard:
	y = 0
	for j in i:
		keyDict[j] = (x, y)
		y += 1
	x += 1
shift = 1 if input() == 'L' else -1
msg = input()
newmsg = ''
for i in msg:
	idx = keyDict[i]
	newmsg += keyboard[idx[0]][idx[1] + shift]
print(newmsg)


yyy = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
n = input()
m = list(input())
if n == 'R':
	for i in range(len(m)):
		m[i] = yyy[yyy.index(m[i]) - 1]
	print(''.join(m))
	exit()
for i in range(len(m)):
	m[i] = yyy[yyy.index(m[i]) + 1]
print(''.join(m))


keyboard_list = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
R_L = {'R': -1, 'L': 1}
input_0 = input()
input_1 = input()
result_txt = str()
for char in input_1:
	for row in range(3):
		if char in keyboard_list[row]:
			result_txt += keyboard_list[row][keyboard_list[row].index(char) + R_L[input_0]]
			continue
print(result_txt)


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'R':
	for i in range(len(b)):
		for j in range(30):
			if c[j] == b[i]:
				print(c[j - 1], end='')
else:
	for i in range(len(b)):
		for j in range(30):
			if c[j] == b[i]:
				print(c[j + 1], end='')


keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
key = input()
c = 1
if key == 'R':
	c = -1
typeIn = input()
for char in typeIn:
	for i in range(0, 30):
		if char == keyboard[i]:
			print(keyboard[i + c], end='')


LorR = input().upper()
sequence = input()
l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
res = ''
for i in sequence:
	if i in l1:
		if LorR == 'R':
			q = l1.find(i)
			res += l1[q - 1]
		else:
			q = l1.find(i)
			res += l1[q + 1]
	elif i in l2:
		if LorR == 'R':
			q = l2.find(i)
			res += l2[q - 1]
		else:
			q = l2.find(i)
			res += l2[q + 1]
	elif i in l3:
		if LorR == 'R':
			q = l3.find(i)
			res += l3[q - 1]
		else:
			q = l3.find(i)
			res += l3[q + 1]
print(res)


line = list('qwertyuiopasdfghjkl;zxcvbnm,./')
inp = input()
shift = 0
if inp == 'R':
	shift = -1
else:
	shift = 1
inp = list(input())
answer = ''
for j in inp:
	ind = line.index(j)
	ind += shift
	answer += line[ind]
print(answer)


string_of_letters = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
z = [str(qb) for qb in input()]
if n == 'R':
	for (i, j) in enumerate(z):
		temp_letter = string_of_letters.find(j) - 1
		print(string_of_letters[temp_letter], end='')
if n == 'L':
	for (i, j) in enumerate(z):
		temp_letter = string_of_letters.find(j) + 1
		print(string_of_letters[temp_letter], end='')


string = list()

def solve():
	string.append('qwertyuiop')
	string.append('asdfghjkl;')
	string.append('zxcvbnm,./')
	dis = input()
	strr = input()
	ans = ''
	if dis == 'R':
		for i in range(len(strr)):
			x = str(strr[i])
			for j in range(3):
				cnt = string[j].count(x)
				if cnt >= 1:
					idx = string[j].find(x)
					ans += string[j][idx - 1]
					break
	else:
		for i in range(len(strr)):
			x = str(strr[i])
			for j in range(3):
				cnt = string[j].count(x)
				if cnt >= 1:
					idx = string[j].find(x)
					ans += string[j][idx + 1]
					break
	print(ans)
solve()


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
q = input()
x = 0
if c == 'R':
	x = -1
elif c == 'L':
	x = 1
z = ''
for i in q:
	z += s[s.index(i) + x]
print(z)


k = 'qwertyuiopasdfghjkl;zxcvbnm,./ '
d = input()
for a in input():
	print([k[k.index(a) - 1], k[k.index(a) + 1]][d == 'L'], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = list(a)
n = str(input())
p = list(input())
z = []
for i in range(len(p)):
	if n == 'R':
		s = a.index(p[i])
		z.append(a[s - 1])
	else:
		s = a.index(p[i])
		z.append(a[s + 1])
print(''.join(z))


n = input()
instr = input()
ltrs = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if n == 'R':
	for item in instr:
		indx = ltrs.find(item)
		print(ltrs[indx - 1], end='')
else:
	for item in instr:
		indx = ltrs.find(item)
		print(ltrs[indx + 1], end='')


keybrd = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
msgBefore = input()
indector = -1 if direction == 'R' else 1
res = ''
for ch in msgBefore:
	res += keybrd[keybrd.index(ch) + indector]
print(res)


keys = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']

def solve(direction, x):
	keys_curr = []
	index = 0
	output = ''
	for i in x:
		if i in keys[0]:
			keys_curr = keys[0]
		elif i in keys[1]:
			keys_curr = keys[1]
		elif i in keys[2]:
			keys_curr = keys[2]
		index = keys_curr.index(i)
		if direction == 'L':
			output += keys_curr[(index + 1) % 10]
		elif direction == 'R':
			if index - 1 == -1:
				index = 10
			output += keys_curr[index - 1]
	return output
direction = input()
x = input()
print(solve(direction, x))


side = input()
text = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
side = -1 if side == 'R' else 1
new_string = ''
for i in text:
	new_string += keyboard[keyboard.find(i) + side]
print(new_string)


direction = input()
keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
InpChar = list(input())
x = len(InpChar)
OutList = [None] * x
for i in range(x):
	if direction == 'R':
		Index = keyboard.index(InpChar[i])
		OutList[i] = keyboard[Index - 1]
	else:
		Index = keyboard.index(InpChar[i])
		OutList[i] = keyboard[Index + 1]
for i in range(x):
	print(OutList[i], end='')


R = {'q': 'p', 'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 'a': ';', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'z': '/', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
L = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'p': 'q', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', ';': 'a', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/', '/': 'z'}
direction = input()
sent = input()
if direction == 'R':
	for i in sent:
		print(R[i], end='')
else:
	for i in sent:
		print(L[i], end='')


direction = input()
u_input = input()
keypad = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
result = ''
if direction == 'L':
	for i in u_input:
		if i == 'p' or i == ';' or i == '/':
			result += keypad[keypad.index(i) - 1]
		else:
			result += keypad[keypad.index(i) + 1]
if direction == 'R':
	for i in u_input:
		if i == 'q' or i == 'a' or i == 'z':
			result += keypad[keypad.index(i) + 1]
		else:
			result += keypad[keypad.index(i) - 1]
print(result)


reference = list('qwertyuiopasdfghjkl;zxcvbnm,./')
ch = input()
s = input()
temp = []
if ch == 'R':
	for i in range(len(s)):
		temp.append(reference[reference.index(s[i]) - 1])
	print(''.join(temp))
else:
	for i in range(len(s)):
		temp.append(reference[reference.index(s[i]) + 1])
	print(''.join(temp))


q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
sh = input()
s = input()
if sh == 'R':
	k = -1
else:
	k = 1
for i in s:
	w = q.index(i)
	print(q[w + k], end='')


import string
first = 'qwertyuiopasdfghjkl;zxcvbnm,./'
lr = input()
message = input()
result = ''
switch = 1
if lr == 'R':
	switch = -1
for x in message:
	if x in first:
		result += first[first.index(x) + switch]
print(result)


l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
q = input()
s = input()
x = ''
if q == 'R':
	for i in s:
		x = x + l[l.index(i) - 1]
elif q == 'L':
	for i in s:
		x = x + l[l.index(i) + 1]
print(x)


t = input()
s = input()
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if t == 'R':
	k = -1
else:
	k = 1
for i in range(len(s)):
	print(l[l.find(s[i]) + k], end='')


ch = input()
st = input()
d0 = {'R': -1, 'L': 1}
st2 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
print(''.join([st2[st2.find(ch2) + d0[ch]] for ch2 in st]))


keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
direction = 1
if input() == 'L':
	direction = -1
data = input()
for x in data:
	pos = 0
	while x not in keyboard[pos]:
		pos += 1
	y = keyboard[pos][keyboard[pos].find(x) - direction]
	print(y, end='')


letter = input()
string = input()
answer = ''
keyboard = {'q': 1, 'w': 2, 'e': 3, 'r': 4, 't': 5, 'y': 6, 'u': 7, 'i': 8, 'o': 9, 'p': 10, 'a': 11, 's': 12, 'd': 13, 'f': 14, 'g': 15, 'h': 16, 'j': 17, 'k': 18, 'l': 19, ';': 20, 'z': 21, 'x': 22, 'c': 23, 'v': 24, 'b': 25, 'n': 26, 'm': 27, ',': 28, '.': 29, '/': 30}
for i in string:
	if letter == 'R':
		key = keyboard[i] - 1
	else:
		key = keyboard[i] + 1
	key_list = list(keyboard.keys())
	answer += key_list[key - 1]
print(answer)


c = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = input()
for i in range(len(s)):
	print(key[key.find(s[i]) + (c == 'L') - (c == 'R')], end='')
print()


n = input()
a1 = 'qwertyuiop'
a2 = 'asdfghjkl;'
a3 = 'zxcvbnm,./'
b = input()
if n == 'R':
	for i in range(len(b)):
		for j in range(10):
			if a1[j] == b[i]:
				print(a1[j - 1], end='')
		for j in range(10):
			if a2[j] == b[i]:
				print(a2[j - 1], end='')
		for j in range(10):
			if a3[j] == b[i]:
				print(a3[j - 1], end='')
elif n == 'L':
	for i in range(len(b)):
		for j in range(10):
			if a1[j] == b[i]:
				print(a1[j + 1], end='')
		for j in range(10):
			if a2[j] == b[i]:
				print(a2[j + 1], end='')
		for j in range(10):
			if a3[j] == b[i]:
				print(a3[j + 1], end='')


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
c = input()
s = input()
dic1 = {}
dic2 = {}
dic3 = {}
st = ''
if c == 'L':
	for i in range(len(s)):
		for j in range(len(s1)):
			if s[i] == s1[j]:
				st = st + s1[j + 1]
			elif s[i] == s2[j]:
				st = st + s2[j + 1]
			elif s[i] == s3[j]:
				st = st + s3[j + 1]
	print(st)
else:
	for i in range(len(s)):
		for j in range(len(s1)):
			if s[i] == s1[j]:
				st = st + s1[j - 1]
			elif s[i] == s2[j]:
				st = st + s2[j - 1]
			elif s[i] == s3[j]:
				st = st + s3[j - 1]
	print(st)


key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ch = input()
word = input()
letter = ''
if ch == 'R':
	for i in word:
		for j in range(len(key)):
			if j == 0 and key[j] == i:
				letter += key[j]
			elif key[j] == i:
				letter += key[j - 1]
if ch == 'L':
	for i in word:
		for j in range(len(key)):
			if j == len(key) - 1 and key[j] == i:
				letter += key[j]
			elif key[j] == i:
				letter += key[j + 1]
print(letter)


n = input()
k = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = ''
for i in range(len(k)):
	if n == 'R':
		c = a.find(k[i]) - 1
		b = b + a[c]
	elif n == 'L':
		c = a.find(k[i]) + 1
		b = b + a[c]
print(b)


move = input()
text = input()
msg = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = ''
for i in range(len(text)):
	t = msg.find(text[i])
	if move == 'R':
		s += msg[t - 1]
	else:
		s += msg[t + 1]
print(s)


r = input()
lst = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
lst2 = []
if r == 'R':
	for i in range(len(lst)):
		c = a.find(lst[i])
		lst2.append(a[c - 1])
if r == 'L':
	for i in range(len(lst)):
		c = a.find(lst[i])
		lst2.append(a[c + 1])
s = ''
print(s.join(lst2))


n = input()
l = input()
s = list('qwertyuiopasdfghjkl;zxcvbnm,./')
a = ''
p = list(l)
if n == 'R':
	for i in list(l):
		d = s.index(i)
		a = a + s[d - 1]
	print(a)
elif n == 'L':
	for i in list(l):
		d = s.index(i)
		a = a + s[d + 1]
	print(a)


shift = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
d1 = {'q': '', 'a': '', 'z': '', 'p': 'o', ';': 'l', '/': '.'}
for i in range(1, 9):
	l1 = s1[i]
	l2 = s2[i]
	l3 = s3[i]
	d1[l1] = s1[i - 1]
	d1[l2] = s2[i - 1]
	d1[l3] = s3[i - 1]
d2 = {'q': 'w', 'a': 's', 'z': 'x', 'p': '', 'l': '', '/': ''}
for i in range(1, 9):
	r1 = s1[i]
	r2 = s2[i]
	r3 = s3[i]
	d2[r1] = s1[i + 1]
	d2[r2] = s2[i + 1]
	d2[r3] = s3[i + 1]
message = input()
l1 = []
for char in message:
	if shift == 'L':
		dec = d2[char]
		l1.append(dec)
	else:
		dec = d1[char]
		l1.append(dec)
print(''.join(l1))


s = input()
st = input()
std = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if s == 'R':
	for i in range(len(st)):
		for j in range(len(std)):
			if st[i] == std[j]:
				print(std[j - 1], end='')
else:
	for i in range(len(st)):
		for j in range(len(std)):
			if st[i] == std[j]:
				print(std[j + 1], end='')


arr = 'qwertyuiopasdfghjkl;zxcvbnm,./'
brr = [-1] * 256
for i in range(len(arr)):
	brr[ord(arr[i])] = i
d = input()
st = input()
w = 0
if d == 'R':
	w = -1
else:
	w = 1
for chars in st:
	print(arr[brr[ord(chars)] + w], end='')


rl = input()
s = input()
r1 = 'qwertyuiop'
r2 = 'asdfghjkl;'
r3 = 'zxcvbnm,./'
res = ''
if rl == 'R':
	for i in s:
		if i in r1:
			res += r1[r1.index(i) - 1]
		if i in r2:
			res += r2[r2.index(i) - 1]
		if i in r3:
			res += r3[r3.index(i) - 1]
	print(res)
if rl == 'L':
	for i in s:
		if i in r1:
			res += r1[r1.index(i) + 1]
		if i in r2:
			res += r2[r2.index(i) + 1]
		if i in r3:
			res += r3[r3.index(i) + 1]
	print(res)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
t = input()
line = input()
n = len(s)
for i in line:
	for j in range(n):
		if i == s[j]:
			if t == 'R':
				print(s[j - 1], end='')
			else:
				print(s[j + 1], end='')
			break
print()


a = input()
b = input()
b = ' '.join(b)
b = b.split()
list1 = []
dict1 = {'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
if a == 'R':
	for i in b:
		list1.append(dict1[i])
	c = ''
	for i in list1:
		c = c + i
	print(c)
elif a == 'L':
	dict2 = {v: k for (k, v) in dict1.items()}
	for i in b:
		list1.append(dict2[i])
	c = ''
	for i in list1:
		c = c + i
	print(c)


top = 'qqwertyuiopp'
mid = 'aasdfghjkl;;'
bot = 'zzxcvbnm,.//'
shift = input()
s = input()
for (i, char) in enumerate(s):
	if shift == 'R':
		if char in top:
			index = top.find(char, 1)
			char = top[index - 1]
			print(char, end='')
		if char in mid:
			index = mid.find(char, 1)
			char = mid[index - 1]
			print(char, end='')
		if char in bot:
			index = bot.find(char, 1)
			char = bot[index - 1]
			print(char, end='')
	else:
		if char in top:
			index = top.find(char, 1)
			char = top[index + 1]
			print(char, end='')
		if char in mid:
			index = mid.find(char, 1)
			char = mid[index + 1]
			print(char, end='')
		if char in bot:
			index = bot.find(char, 1)
			char = bot[index + 1]
			print(char, end='')


KEYBOARD = ('q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/')
direction = input()
if direction == 'L':
	direction = 1
else:
	direction = -1
print(''.join(map(lambda char: KEYBOARD[KEYBOARD.index(char) + direction], list(input()))))


LorR = input()
s = input()
ans = ''
qwerty = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if LorR == 'R':
	for i in s:
		ans = ans + qwerty[qwerty.index(i) - 1]
else:
	for i in s:
		ans = ans + qwerty[qwerty.index(i) + 1]
print(ans)


lr = input()
s = input()
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if lr == 'R':
	for i in range(len(s)):
		ans += l[l.index(s[i]) - 1]
else:
	for j in range(len(s)):
		ans += l[l.index(s[j]) + 1]
print(ans)


dr = input()
chars = input()
keys = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']

def getLine(char):
	for (x, i) in zip(keys, range(3)):
		if char in x:
			return i

def moveleft(char, num):
	s = keys[num]
	pos = s.find(char)
	return s[pos - 1]

def moveright(char, num):
	s = keys[num]
	pos = s.find(char)
	return s[pos + 1]
cbs = {'L': moveright, 'R': moveleft}

def sorce():
	for x in chars:
		line = getLine(x)
		yield cbs[dr](x, line)
print(''.join(sorce()))


R = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'p': '[', '[': ']', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', ';': "'", 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/'}
L = {'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', '[': 'p', ']': '[', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', "'": ';', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
charr = input()
s = input()
ss = []
lns = len(s)
for i in range(lns):
	ss.append(s[i])
p = ''
if charr == 'R':
	for i in range(lns):
		ss[i] = L[s[i]]
		p += ss[i]
else:
	for i in range(lns):
		ss[i] = R[s[i]]
		p += ss[i]
print(p)


import math
import os
import sys
import re
import string
import itertools
import functools
import operator
lmap = {'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
rmap = {v: k for (k, v) in lmap.items()}
(map, shift) = ({}, input())
if shift == 'R':
	map = lmap
else:
	map = rmap
res = ''
for i in input():
	res = res + map[i]
print(res)


s = input().strip()
k = input().strip()
check = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if s == 'R':
	for i in k:
		print(check[check.find(i) - 1], end='')
elif s == 'L':
	for i in k:
		if i == '/':
			print('q', end='')
		print(check[check.find(i) + 1], end='')


dir = input().strip()
seq = input().strip()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
chToPos = {}
for i in range(len(keyboard)):
	chToPos[keyboard[i]] = i
offset = 1 if dir == 'L' else -1
ans = ''
for c in seq:
	ans += keyboard[offset + chToPos[c]]
print(ans)


p = input()
word = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if p == 'R':
	for i in word:
		w = s.index(i) - 1
		ans += s[w]
else:
	for i in word:
		w = s.index(i) + 1
		ans += s[w]
print(ans)


m = input()
string = input()
f = 'qwertyuiop'
s = 'asdfghjkl;'
t = 'zxcvbnm,./'

def search_(i):
	if i in f:
		return 'f'
	elif i in s:
		return 's'
	return 't'
if m == 'R':
	for i in string:
		if search_(i) == 'f':
			print(f[f.index(i) - 1], end='')
		elif search_(i) == 's':
			print(s[s.index(i) - 1], end='')
		else:
			print(t[t.index(i) - 1], end='')
else:
	for i in string:
		if search_(i) == 'f':
			print(f[f.index(i) + 1], end='')
		elif search_(i) == 's':
			print(s[s.index(i) + 1], end='')
		else:
			print(t[t.index(i) + 1], end='')
print()


p = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k = input()
s = input()
if k == 'L':
	for x in s:
		print(p[p.index(x) + 1], end='')
else:
	for x in s:
		print(p[p.index(x) - 1], end='')


s = input()
a = input()
j = 0
i = 0
lst1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
lst2 = []
while i < 30:
	if j < len(a):
		c = lst1[i]
		i += 1
		if c == a[j]:
			if s == 'L':
				lst2.append(lst1[i])
				j += 1
				i = 0
			if s == 'R':
				lst2.append(lst1[i - 2])
				j += 1
				i = 0
	else:
		break
print(''.join(lst2))


c = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
q = input()
p = ''
if c == 'L':
	for i in range(0, len(q)):
		j = q[i]
		for k in range(0, len(s)):
			if j == s[k]:
				p += s[k + 1]
				break
if c == 'R':
	for i in range(0, len(q)):
		j = q[i]
		for k in range(0, len(s)):
			if j == s[k]:
				p += s[k - 1]
				break
print(p)


arr = list('qwertyuiopasdfghjkl;zxcvbnm,./')
option = input()
str1 = input()
if option == 'R':
	for i in str1:
		print(arr[arr.index(i) - 1], end='')
elif option == 'L':
	for i in str1:
		print(arr[arr.index(i) + 1], end='')


row1 = list('qwertyuiop')
row2 = list('asdfghjkl;')
row3 = list('zxcvbnm,./')
c = input()
i = 0
if c == 'R':
	i = -1
elif c == 'L':
	i = 1
str = list(input())
n = len(str)
res = []
for x in str:
	if x in row1:
		res.append(row1[row1.index(x) + i])
	elif x in row2:
		res.append(row2[row2.index(x) + i])
	elif x in row3:
		res.append(row3[row3.index(x) + i])
print(''.join(res))


n = input()
w = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in w:
	if n == 'L':
		print(s[s.index(i) + 1], end='')
	else:
		print(s[s.index(i) - 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
s = input()
if c == 'R':
	j = -1
else:
	j = 1
for i in range(len(s)):
	print(a[a.find(s[i]) + j], end='')


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
arr = [a, b, c]
l = {}
r = {}
for i in arr:
	for j in range(1, len(i)):
		r[i[j]] = i[j - 1]
	for j in range(len(i) - 1):
		l[i[j]] = i[j + 1]
o = input()
s = input()
if o == 'R':
	print(''.join([r[i] for i in s]))
else:
	print(''.join([l[i] for i in s]))


shift = input()
string = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
if shift == 'L':
	flag = 1
else:
	flag = -1
for i in range(len(string)):
	idx = key.index(string[i])
	res += key[idx + flag]
print(res)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
t = input()
d = dict()
for i in range(1, len(a)):
	if t == 'L':
		d[a[i - 1]] = a[i]
	else:
		d[a[i]] = a[i - 1]
print(''.join((d[x] for x in input())))


l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
b = input()
for i in b:
	if a == 'R':
		print(l[l.find(i) - 1], end='')
	else:
		print(l[l.find(i) + 1], end='')


napr = str(input())
if napr == 'R':
	napr = -1
else:
	napr = 1
clav = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = str(input())
sc = ''
for i in s:
	sc += clav[clav.find(i) + napr]
print(sc)


letter = input()
s = input()
a = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
ans = ''
for i in range(len(s)):
	for j in range(3):
		if s[i] in a[j]:
			if letter == 'R':
				ans += a[j][a[j].index(s[i]) - 1]
			else:
				ans += a[j][a[j].index(s[i]) + 1]
			break
print(ans)


shift = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
inputStr = input()
if shift == 'L':
	indmov = 1
else:
	indmov = -1
outputStr = ''
for char in inputStr:
	pos = keyboard.find(char) + indmov
	outputStr = outputStr + keyboard[pos]
print(outputStr)


a = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = ''
for i in input():
	if a == 'R':
		x += s[s.index(i) - 1]
	else:
		x += s[s.index(i) + 1]
print(x)


a = input()
s = input()
b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'R':
	for i in s:
		print(b[b.index(i) - 1], end='')
elif a == 'L':
	for i in s:
		print(b[b.index(i) + 1], end='')


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
test = input()
s = input()
if test == 'L':
	k = 1
else:
	k = -1
l = []
for ch in s:
	p = a.find(ch)
	if not p == -1:
		l.append(a[p + k])
	else:
		q = b.find(ch)
		if not q == -1:
			l.append(b[q + k])
		else:
			r = c.find(ch)
			l.append(c[r + k])
for x in l:
	print(x, end='')


move = input()
s = input()
out = ''
s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if move == 'R':
	for i in range(len(s)):
		out = out + s1[s1.find(s[i]) - 1]
else:
	for i in range(len(s)):
		out = out + s1[s1.find(s[i]) + 1]
print(out)


alph = 'qwertyuiopasdfghjkl;zxcvbnm,./'
side = input()
msg = input()
newMsg = ''
if side == 'R':
	for i in range(len(msg)):
		position = alph.find(msg[i])
		newMsg += alph[position - 1]
if side == 'L':
	for i in range(len(msg)):
		position = alph.find(msg[i])
		newMsg += alph[position + 1]
print(newMsg)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
l = input()
if n == 'R':
	for i in l:
		print(a[a.index(i) - 1], end='')
else:
	for i in l:
		print(a[a.index(i) + 1], end='')


infoqwerty = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
encrypt = input()
anw = ''
for i in encrypt:
	e = infoqwerty.index(i)
	if 'R' in direction:
		anw += infoqwerty[e - 1]
	else:
		anw += infoqwerty[e + 1]
print(anw)


keybrd = 'qwertyuiopasdfghjkl;zxcvbnm,./'
indector = -1 if input() == 'R' else 1
msg = input()
print(''.join([keybrd[keybrd.index(ch) + indector] for ch in msg]))


d = input()
x = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
arr = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
ans = ''
if d == 'L':
	for i in x:
		ind = int(a.index(i) / 10)
		ans += arr[ind][(arr[ind].index(i) + 1) % 10]
else:
	for i in x:
		ind = int(a.index(i) / 10)
		ans += arr[ind][arr[ind].index(i) - 1]
print(ans)


Index = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
n = input()
a = input()
if n == 'R':
	for i in range(1, 30):
		a = a.replace(Index[i], Index[i - 1])
else:
	for i in range(28, -1, -1):
		a = a.replace(Index[i], Index[i + 1])
print(a)


d = -1 if input() == 'R' else 1
mes = input()
r1 = 'qwertyuiop'
r2 = 'asdfghjkl;'
r3 = 'zxcvbnm,./'
res = ''
for old_letter in mes:
	new_letter = '@'
	if r1.find(old_letter) >= 0:
		new_letter = r1[r1.find(old_letter) + d]
	if r2.find(old_letter) >= 0:
		new_letter = r2[r2.find(old_letter) + d]
	if r3.find(old_letter) >= 0:
		new_letter = r3[r3.find(old_letter) + d]
	res = res + new_letter
print(res)


n = input()
s = '/qwertyuiopasdfghjkl;zxcvbnm,./q'
q = input()
s1 = ''
if n == 'R':
	for (ind, it) in enumerate(q):
		for i in range(1, 31):
			if it == s[i]:
				s1 += s[i - 1]
else:
	for (ind, it) in enumerate(q):
		for i in range(1, 31):
			if it == s[i]:
				s1 += s[i + 1]
print(s1)


import math

def main():
	q1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	q2 = 'asdfghjkl;'
	q3 = 'zxcvbnm,./'
	n = 1
	if input() == 'R':
		n = -1
	s = input()
	s2 = ''
	for i in range(len(s)):
		s2 = s2 + q1[q1.find(s[i]) + n]
	print(s2)
main()


n = input()
s = input()
l = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
ll = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
if n == 'L':
	for i in s:
		x = ll.index(i)
		print(l[x + 1], end='')
else:
	for i in s:
		x = l.index(i)
		print(l[x - 1], end='')
print()


n = {'R': -1, 'L': 1}[input()]
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in input():
	print(s[s.find(i) + n], end='')


string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
inc = -1 if a == 'R' else 1
for i in input():
	print(string[string.index(i) + inc], end='')


l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
s = input()
m = len(s)
for i in range(m):
	c = l.find(s[i])
	if n == 'L':
		print(l[c + 1], end='')
	else:
		print(l[c - 1], end='')


key = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
c = input()
s = input()
dx = 0
dy = 0
if c == 'R':
	dy = -1
elif c == 'L':
	dy = 1
elif c == 'U':
	dx = -1
else:
	dx = 1
for i in s:
	x = 0
	y = 0
	for j in range(3):
		if i in key[j]:
			x = j
			y = key[j].index(i)
	print(key[x + dx][y + dy], end='')


m = input()
if m == 'R':
	m = -1
else:
	m = 1
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = list(input())
for i in range(len(a)):
	idx = keyboard.index(a[i])
	a[i] = keyboard[idx + m]
print(''.join(a))


a = str(input())
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in input():
	print(c[c.index(i) + [1, -1][a == 'R']], end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
dir = input()
seq = input()
message = ''
for i in range(len(seq)):
	if dir == 'R':
		message += keyboard[keyboard.find(seq[i]) - 1]
	elif dir == 'L':
		message += keyboard[keyboard.find(seq[i]) + 1]
	else:
		message += keyboard[keyboard.find(seq[i])]
print(message)


x1 = 'qwertyuiop'
x2 = 'asdfghjkl;'
x3 = 'zxcvbnm,./'
x = input()
y = input()
z = ''
for i in range(len(y)):
	if y[i] in x1:
		c = x1.index(y[i])
		if x == 'L':
			z = z + x1[c + 1]
		else:
			z = z + x1[c - 1]
	if y[i] in x2:
		c = x2.index(y[i])
		if x == 'L':
			z = z + x2[c + 1]
		else:
			z = z + x2[c - 1]
	if y[i] in x3:
		c = x3.index(y[i])
		if x == 'L':
			z = z + x3[c + 1]
		else:
			z = z + x3[c - 1]
print(z)


from sys import stdin, stdout
input = stdin.readline
d = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
text = list(input())[:-1]
for i in range(len(text)):
	text[i] = d[d.index(text[i]) + (-1 if shift == 'R\n' else 1)]
stdout.write(''.join(text))


step = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
message = input()
ans = ''
if step == 'R':
	step1 = -1
else:
	step1 = 1
for c in message:
	ans += keyboard[keyboard.index(c) + step1]
print(ans)


n = input()
s = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
ans = ''
if n == 'R':
	for i in s:
		if i in a:
			d = a.find(i)
			if d != 0:
				ans += a[d - 1]
			else:
				ans += a[d]
		elif i in b:
			d = b.find(i)
			if d != 0:
				ans += b[d - 1]
			else:
				ans += b[d]
		else:
			d = c.find(i)
			if d != 0:
				ans += c[d - 1]
			else:
				ans += c[d]
else:
	for i in s:
		if i in a:
			d = a.find(i)
			if d != 9:
				ans += a[d + 1]
			else:
				ans += a[d]
		elif i in b:
			d = b.find(i)
			if d != 9:
				ans += b[d + 1]
			else:
				ans += b[d]
		else:
			d = c.find(i)
			if d != 9:
				ans += c[d + 1]
			else:
				ans += c[d]
print(ans)


def solve(loc, seq):
	keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	ans = ''
	for i in seq:
		for j in range(len(keys)):
			if i == keys[j]:
				if loc == 'R':
					ans += keys[j - 1]
				else:
					ans += keys[j + 1]
	return ans
loc = input()
seq = input()
print(solve(loc, seq))


n = input()
q = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if n == 'R':
	for i in q:
		v = a.index(i)
		print(a[v - 1], end='')
if n == 'L':
	for i in q:
		v = a.index(i)
		print(a[v + 1], end='')


lr = input()
s = input()
l1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
l2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
l3 = list('zxcvbnm,./')
if lr == 'R':
	for i in list(s):
		if i in l1:
			print(l1[l1.index(i) - 1], end='')
		elif i in l2:
			print(l2[l2.index(i) - 1], end='')
		else:
			print(l3[l3.index(i) - 1], end='')
else:
	for i in list(s):
		if i in l1:
			print(l1[l1.index(i) + 1], end='')
		elif i in l2:
			print(l2[l2.index(i) + 1], end='')
		else:
			print(l3[l3.index(i) + 1], end='')


direction = input()
coded = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
result = ''
shift = -1 if direction == 'R' else 1
for letter in coded:
	result += keyboard[keyboard.index(letter) + shift]
print(result)


p = input()
s = input()
alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if p == 'R':
	sb = -1
else:
	sb = 1
for i in range(len(s)):
	ans += alpha[alpha.find(s[i]) + sb]
print(ans)


p = input()
c = 0
if p == 'R':
	c = -1
else:
	c = 1
q = input()
q = q.replace('', ' ')
q = q.split()
w = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
for i in range(len(q)):
	n = w.index(q[i])
	q[i] = w[n + c]
print(''.join(q))


shift = input()
typ = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
new = ''
if shift == 'R':
	for i in typ:
		new = new + keyboard[keyboard.find(i) - 1]
else:
	for i in typ:
		new = new + keyboard[keyboard.find(i) + 1]
print(new)


S = 'qwertyuiopasdfghjkl;zxcvbnm,./'
S2 = ''
if input() == 'R':
	S1 = input()
	for i in range(len(S1)):
		k = S.index(S1[i])
		S2 = S2 + S[k - 1]
else:
	S1 = input()
	for i in range(len(S1)):
		k = S.index(S1[i])
		S2 = S2 + S[k + 1]
print(S2)


l1 = list('qwertyuiop')
l2 = list('asdfghjkl;')
l3 = list('zxcvbnm,./')
dic1 = {}
dic2 = {}
dic3 = {}
for i in range(10):
	dic1[l1[i]] = i
	dic2[l2[i]] = i
	dic3[l3[i]] = i
d = input()
o = list(input())
for i in range(len(o)):
	if d == 'R':
		if o[i] in l1:
			o[i] = l1[dic1[o[i]] - 1]
		if o[i] in l2:
			o[i] = l2[dic2[o[i]] - 1]
		if o[i] in l3:
			o[i] = l3[dic3[o[i]] - 1]
	if d == 'L':
		if o[i] in l1:
			o[i] = l1[dic1[o[i]] + 1]
		if o[i] in l2:
			o[i] = l2[dic2[o[i]] + 1]
		if o[i] in l3:
			o[i] = l3[dic3[o[i]] + 1]
a = ''
for i in o:
	a += i
print(a)


from sys import stdin, stdout
input = stdin.readline
key = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
dct = {}
for (i, j) in zip(key, range(33)):
	dct[i] = j
dir = input()[:-1]
s = input()[:-1]
if dir == 'R':
	for i in s:
		stdout.write(key[dct[i] - 1])
else:
	for i in s:
		stdout.write(key[dct[i] + 1])


d = input()
r = -1 if d == 'R' else 1
seq = 'qwertyuiopasdfghjkl;zxcvbnm,./'
msg = input()
orignal = ''
for i in range(len(msg)):
	orignal += seq[seq.find(msg[i]) + r]
print(orignal)


__author__ = 'hamed1soleimani'
lines = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
offset = input()
if offset == 'R':
	offset = -1
else:
	offset = 1
li = input()
ou = ''
for ch in li:
	for line in lines:
		i = line.find(ch)
		if i != -1:
			ou += line[i + offset]
print(ou)


l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = []
o = input()
s = input()
if o == 'R':
	c = -1
else:
	c = 1
for i in s:
	ans.append(l[l.index(i) + c])
print(''.join(ans))


c = input()
s = input()
ss = ''
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
for i in range(len(s)):
	for j in range(0, 10):
		if c == 'R':
			if s[i] == s1[j]:
				ss += s1[j - 1]
			elif s[i] == s2[j]:
				ss += s2[j - 1]
			elif s[i] == s3[j]:
				ss += s3[j - 1]
		elif s[i] == s1[j]:
			ss += s1[j + 1]
		elif s[i] == s2[j]:
			ss += s2[j + 1]
		elif s[i] == s3[j]:
			ss += s3[j + 1]
print(ss)


side = input()
find = input()
(fr, sr, srr) = ('qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./')
(ans, s) = ('', 0)
if side == 'R':
	s = -1
else:
	s = 1
for i in find:
	if i in fr:
		ans += fr[fr.index(i) + s]
	elif i in sr:
		ans += sr[sr.index(i) + s]
	else:
		ans += srr[srr.index(i) + s]
print(ans)


side = input()
inp = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = ''
c = ''
ans = ''
if side == 'R':
	for i in range(len(inp)):
		d = a.index(inp[i])
		ans += a[d - 1]
else:
	for i in range(len(inp)):
		d = a.index(inp[i])
		ans += a[d + 1]
print(ans)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
c = input()
x = input()
if c == 'R':
	for i in range(len(x)):
		if x[i] in s1:
			k = s1.index(x[i])
			print(s1[k - 1], end='')
		elif x[i] in s2:
			k = s2.index(x[i])
			print(s2[k - 1], end='')
		elif x[i] in s3:
			k = s3.index(x[i])
			print(s3[k - 1], end='')
if c == 'L':
	for i in range(len(x)):
		if x[i] in s1:
			k = s1.index(x[i])
			print(s1[k + 1], end='')
		elif x[i] in s2:
			k = s2.index(x[i])
			print(s2[k + 1], end='')
		elif x[i] in s3:
			k = s3.index(x[i])
			print(s3[k + 1], end='')


keyboard = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
l = 0
res = []
direction = input()
s = input()
for i in s:
	if i in keyboard[0]:
		l = 0
	elif i in keyboard[1]:
		l = 1
	else:
		l = 2
	if direction == 'R':
		c = keyboard[l].index(i) - 1
		res.append(keyboard[l][c])
	else:
		c = keyboard[l].index(i) + 1
		res.append(keyboard[l][c])
print(''.join(res))


n = input()
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
if n == 'R':
	for i in range(len(x)):
		print(l[l.index(x[i]) - 1], end='')
else:
	for i in range(len(x)):
		print(l[l.index(x[i]) + 1], end='')


li = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = []
ch = [-1, 1][input() == 'L']
line = input()
for i in line:
	c.append(li[li.index(i) + ch])
print(''.join(c))


x = input()
y = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
d = {'m': 26, ',': 27, 'b': 24, '.': 28, 'v': 23, 'u': 6, 'g': 14, 'n': 25, 't': 4, 'o': 8, 'x': 21, 'y': 5, 'j': 16, 'h': 15, 'd': 12, 'l': 18, ';': 19, 'e': 2, 'a': 10, 'f': 13, 's': 11, 'p': 9, 'r': 3, 'c': 22, 'z': 20, 'w': 1, 'q': 0, '/': 29, 'k': 17, 'i': 7}
for i in range(0, len(y)):
	if x == 'R':
		ans += k[d[y[i]] - 1]
	elif x == 'L':
		ans += k[d[y[i]] + 1]
print(ans)


l1 = 'qwertyuiop'
d1 = {l1[i]: i for i in range(len(l1))}
l2 = 'asdfghjkl;'
d2 = {l2[i]: i for i in range(len(l2))}
l3 = 'zxcvbnm,./'
d3 = {l3[i]: i for i in range(len(l3))}
d = input()
res = ''
if d == 'R':
	seq = input()
	for s in seq:
		if s in d1:
			if d1[s] == 0:
				res += s
			else:
				res += l1[d1[s] - 1]
		elif s in d2:
			if d2[s] == 0:
				res += s
			else:
				res += l2[d2[s] - 1]
		elif d3[s] == 0:
			res += s
		else:
			res += l3[d3[s] - 1]
else:
	seq = input()
	for s in seq:
		if s in d1:
			if d1[s] == len(l1) - 1:
				res += s
			else:
				res += l1[d1[s] + 1]
		elif s in d2:
			if d2[s] == len(l2) - 1:
				res += s
			else:
				res += l2[d2[s] + 1]
		elif d3[s] == len(l3) - 1:
			res += s
		else:
			res += l3[d3[s] + 1]
print(res)


temp = list('qwertyuiop')
temp1 = list('asdfghjkl;')
temp2 = list('zxcvbnm,./')
direct = input()
data = input()
temps = list()
for i in range(len(data)):
	if data[i] in temp:
		temps.append(temp[temp.index(data[i]) + (-1 if direct == 'R' else 1)])
	elif data[i] in temp1:
		temps.append(temp1[temp1.index(data[i]) + (-1 if direct == 'R' else 1)])
	elif data[i] in temp2:
		temps.append(temp2[temp2.index(data[i]) + (-1 if direct == 'R' else 1)])
print(''.join(temps))


P = input()
S = input()
S1 = ''
S2 = []
l = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if P == 'R':
	for i in S:
		x = l.index(i)
		S1 += l[x - 1]
elif P == 'L':
	for i in S:
		x = l.index(i)
		S1 += l[x + 1]
print(S1)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
R_L = input()
text = input()
for i in text:
	if R_L == 'R':
		print(keyboard[keyboard.index(i) - 1], end='')
	else:
		print(keyboard[keyboard.index(i) + 1], end='')


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
L = input()
n = input()
st = ''
for i in n:
	ma = 0
	if i in a:
		ma = a.find(i)
		if L == 'R':
			st += a[ma - 1]
		else:
			st += a[ma + 1]
	elif i in b:
		ma = b.find(i)
		if L == 'R':
			st += b[ma - 1]
		else:
			st += b[ma + 1]
	elif i in c:
		ma = c.find(i)
		if L == 'R':
			st += c[ma - 1]
		else:
			st += c[ma + 1]
print(st)


if input() == 'R':
	d = {44: 'm', 46: ',', 47: '.', 98: 'v', 99: 'x', 100: 's', 101: 'w', 102: 'd', 103: 'f', 104: 'g', 105: 'u', 106: 'h', 107: 'j', 108: 'k', 109: 'n', 110: 'b', 111: 'i', 112: 'o', 114: 'e', 115: 'a', 116: 'r', 117: 'y', 118: 'c', 119: 'q', 120: 'z', 121: 't', 59: 'l'}
else:
	d = {108: ';', 110: 'm', 97: 's', 98: 'n', 99: 'v', 100: 'f', 101: 'r', 102: 'g', 103: 'h', 104: 'j', 105: 'o', 106: 'k', 107: 'l', 44: '.', 109: ',', 46: '/', 111: 'p', 113: 'w', 114: 't', 115: 'd', 116: 'y', 117: 'i', 118: 'b', 119: 'e', 120: 'c', 121: 'u', 122: 'x'}
print(input().translate(d))


d1 = []
d2 = []
d3 = []
x = 0
for i in 'qwertyuiop':
	d1.append(i)
x = 0
for i in 'asdfghjkl;':
	d2.append(i)
for i in 'zxcvbnm,./':
	d3.append(i)
p = input()
if p == 'R':
	u = -1
else:
	u = 1
s = input()
for i in s:
	if i in d1:
		for x in range(len(d1)):
			if d1[x] == i:
				break
		print(d1[x + u], end='')
	elif i in d2:
		for x in range(len(d2)):
			if d2[x] == i:
				break
		print(d2[x + u], end='')
	elif i in d3:
		for x in range(len(d3)):
			if d3[x] == i:
				break
		print(d3[x + u], end='')


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ali = input()
s = input()
keys = list(keys)
s = list(s)
if ali == 'R':
	for i in range(len(s)):
		s[i] = keys[keys.index(s[i]) - 1]
if ali == 'L':
	for i in range(len(s)):
		s[i] = keys[keys.index(s[i]) + 1]
print(''.join(s))


g = input()
n = input()
new = ''
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if g == 'R':
	for i in range(0, len(n)):
		for k in range(0, 30):
			if n[i] == l[k]:
				new += l[k - 1]
	print(new)
else:
	for i in range(0, len(n)):
		for k in range(0, 30):
			if n[i] == l[k]:
				new += l[k + 1]
	print(new)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s0 = ''
if input() == 'R':
	for i in input():
		s0 += s[s.find(i) - 1]
else:
	for i in input():
		s0 += s[s.find(i) + 1]
print(s0)


x = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
tmp = input()
s = input()
if tmp == 'R':
	for i in s:
		print(x[x.index(i) - 1], end='')
else:
	for i in s:
		print(x[x.index(i) + 1], end='')


a = input()
b = input()
st = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = -1 if a == 'R' else 1
print(''.join(list(map(lambda x: st[st.index(x) + d], b))))


if input() == 'L':
	m = 1
else:
	m = -1
s = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
r = ''
for i in range(len(s)):
	r += a[a.index(s[i]) + m]
print(r)


shift = str(input())
s = str(input())
keys = list('qwertyuiopasdfghjkl;zxcvbnm,./')
if shift == 'L':
	shift = 1
else:
	shift = -1
ans = ''
for i in s:
	j = keys.index(i)
	ans += keys[j + shift]
print(ans)


from sys import stdin, stdout
dir = input()
l = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
string = stdin.readline()
if dir == 'R':
	a = 1
else:
	a = 0
for x in string[:-1]:
	print(l[l.index(x) - 2 * a + 1], end='')


move = input()
err_string = input()
ans = str()
keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if move == 'R':
	k = -1
else:
	k = 1
for i in err_string:
	ans += keyboard[keyboard.index(i) + k]
print(ans)


pos = str(input())
keyboard = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
stri = list(map(str, list(input())))
ac = ''
for x in stri:
	for b in keyboard:
		for c in b:
			if x == c:
				if pos == 'R':
					ac = ac + str(keyboard[int(keyboard.index(b))][b.index(c) - 1])
				elif pos == 'L':
					ac = ac + str(keyboard[int(keyboard.index(b))][b.index(c) + 1])
print(ac)


q = input()
s = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
for c in s:
	if c in s1:
		if q == 'L':
			print(s1[s1.find(c) + 1], end='')
		else:
			print(s1[s1.find(c) - 1], end='')
	if c in s2:
		if q == 'L':
			print(s2[s2.find(c) + 1], end='')
		else:
			print(s2[s2.find(c) - 1], end='')
	if c in s3:
		if q == 'L':
			print(s3[s3.find(c) + 1], end='')
		else:
			print(s3[s3.find(c) - 1], end='')


keylines = []
keylines.append('qwertyuiop')
keylines.append('asdfghjkl;')
keylines.append('zxcvbnm,./')
shift = 0
if input() == 'L':
	shift = 1
else:
	shift = -1
line = input()
for x in line:
	for s in keylines:
		if x in s:
			print(s[(s.find(x) + shift) % len(s)], end='')


direction = input()
str_1 = 'qwertyuiop'
str_2 = 'asdfghjkl;'
str_3 = 'zxcvbnm,./'
str_x = [x for x in input()]
for i in range(len(str_x)):
	if str_1.find(str_x[i]) != -1:
		if direction == 'R':
			print(str_1[str_1.find(str_x[i]) - 1], end='')
		else:
			print(str_1[str_1.find(str_x[i]) + 1], end='')
	elif str_2.find(str_x[i]) != -1:
		if direction == 'R':
			print(str_2[str_2.find(str_x[i]) - 1], end='')
		else:
			print(str_2[str_2.find(str_x[i]) + 1], end='')
	elif str_3.find(str_x[i]) != -1:
		if direction == 'R':
			print(str_3[str_3.find(str_x[i]) - 1], end='')
		else:
			print(str_3[str_3.find(str_x[i]) + 1], end='')


d = input()
s = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	for i in s:
		print(key[key.index(i) - 1], end='')
if d == 'L':
	for i in s:
		print(key[key.index(i) + 1], end='')


o = input()
msg = input()
abc = 'qwertyuiopasdfghjkl;zxcvbnm,./'
Dmsg = ''
if o == 'L':
	for char in msg:
		Dmsg += abc[abc.index(char) + 1]
else:
	for char in msg:
		Dmsg += abc[abc.index(char) - 1]
print(Dmsg)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = -1 if input() == 'R' else 1
r = input()
t = ''
for i in range(len(r)):
	t += s[s.index(r[i]) + d]
print(t)


k = input()
s = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
if k == 'R':
	for i in s:
		if i in a:
			print(a[a.index(i) - 1], end='')
		elif i in b:
			print(b[b.index(i) - 1], end='')
		else:
			print(c[c.index(i) - 1], end='')
else:
	for i in s:
		if i in a:
			print(a[a.index(i) + 1], end='')
		elif i in b:
			print(b[b.index(i) + 1], end='')
		else:
			print(c[c.index(i) + 1], end='')


import collections
import itertools
import sys
from collections import defaultdict, Counter
from math import sqrt, ceil
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def ds(d):
	return int(str(d).replace('0', ''))

def find(c, keys):
	for (i, l) in enumerate(keys):
		for (j, r) in enumerate(l):
			if r == c:
				return (i, j)

def main():
	keys = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
	d = -1 if input().strip() == 'R' else 1
	v = input().strip()
	res = ''
	for c in v:
		(x, y) = find(c, keys)
		res += keys[x][y + d]
	print(res)
main()


def fun(st, n):
	s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	ans = ''
	for i in st:
		ans += s[s.find(i) + [1, -1][n == 'R']]
	print(ans)
T = 1
for i in range(T):
	n = input()
	st = input()
	fun(st, n)


a = input()
n = input()
code_1 = []
code = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for j in range(len(n)):
	if a == 'R':
		code_1.append(code[code.find(n[j]) - 1])
	else:
		code_1.append(code[code.find(n[j]) + 1])
print(''.join(code_1))


keyboard = list('qwertyuiopasdfghjkl;zxcvbnm,./')
rorl = (-1, 1)[input() == 'R']
text = input()
ans = ''
for i in text:
	ans += keyboard[keyboard.index(i) - rorl]
print(ans)


import math
from collections import Counter
first = input()
second = input()
default_string1 = 'qwertyuiop'
default_string2 = 'asdfghjkl;'
default_string3 = 'zxcvbnm,./'
string = ''
is_right = False
if first == 'R':
	is_right = True
for i in second:
	if i in default_string1:
		count = default_string1.find(i)
		if is_right:
			string += default_string1[count - 1]
		else:
			string += default_string1[count + 1]
	elif i in default_string2:
		count = default_string2.find(i)
		if is_right:
			string += default_string2[count - 1]
		else:
			string += default_string2[count + 1]
	elif i in default_string3:
		count = default_string3.find(i)
		if is_right:
			string += default_string3[count - 1]
		else:
			string += default_string3[count + 1]
print(string)


d = input()
v = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = ''
for i in range(len(v)):
	if d == 'R' and v[i] != s[0]:
		a = a + s[s.find(v[i]) - 1]
	else:
		a = a + s[s.find(v[i]) + 1]
print(a)


shift = input()
message = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
original_message = ''
if shift == 'R':
	for char in message:
		original_message += keyboard[keyboard.index(char) - 1]
else:
	for char in message:
		original_message += keyboard[keyboard.index(char) + 1]
print(original_message)


s = input()
t = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
x = ''
for i in range(len(t)):
	if s == 'R':
		if t[i] in a:
			x += a[a.index(t[i]) - 1]
		if t[i] in b:
			x += b[b.index(t[i]) - 1]
		if t[i] in c:
			x += c[c.index(t[i]) - 1]
	else:
		if t[i] in a:
			x += a[a.index(t[i]) + 1]
		if t[i] in b:
			x += b[b.index(t[i]) + 1]
		if t[i] in c:
			x += c[c.index(t[i]) + 1]
print(x)


s = input()
s1 = input()
s1 = list(s1)
k1 = 'qwertyuiop'
k2 = 'asdfghjkl;'
k3 = 'zxcvbnm,./'
if s == 'R':
	for i in range(len(s1)):
		if s1[i] in k1:
			s1[i] = k1[k1.index(s1[i]) - 1]
		elif s1[i] in k2:
			s1[i] = k2[k2.index(s1[i]) - 1]
		else:
			s1[i] = k3[k3.index(s1[i]) - 1]
else:
	for i in range(len(s1)):
		if s1[i] in k1:
			s1[i] = k1[k1.index(s1[i]) + 1]
		elif s1[i] in k2:
			s1[i] = k2[k2.index(s1[i]) + 1]
		else:
			s1[i] = k3[k3.index(s1[i]) + 1]
print(''.join(s1))


side = input()
text = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
answer = ''
for i in text:
	loc = keyboard.find(i)
	if side == 'R':
		answer += keyboard[loc - 1]
	elif side == 'L':
		answer += keyboard[loc + 1]
print(answer)


def get_index(row, c):
	for i in range(0, len(row)):
		if row[i] == c:
			return i
first_row = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
second_row = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
third_row = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
shift = str(input())
sequence = str(input())
if shift == 'R':
	result = []
	for c in sequence:
		if c in first_row:
			req_idx = get_index(first_row, c) - 1
			result.append(first_row[req_idx])
		elif c in second_row:
			req_idx = get_index(second_row, c) - 1
			result.append(second_row[req_idx])
		else:
			req_idx = get_index(third_row, c) - 1
			result.append(third_row[req_idx])
	print(''.join(result))
else:
	result = []
	for c in sequence:
		if c in first_row:
			req_idx = get_index(first_row, c) + 1
			result.append(first_row[req_idx])
		elif c in second_row:
			req_idx = get_index(second_row, c) + 1
			result.append(second_row[req_idx])
		else:
			req_idx = get_index(third_row, c) + 1
			result.append(third_row[req_idx])
	print(''.join(result))


row1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
row2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
row3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
x = input('')
y = input('')
ylist = []
zlist = []
for i in range(len(y)):
	ylist.append(y[i])
if x == 'R':
	for i in range(len(ylist)):
		for j in range(10):
			if ylist[i] == row1[j]:
				zlist.append(row1[j - 1])
			elif ylist[i] == row2[j]:
				zlist.append(row2[j - 1])
			elif ylist[i] == row3[j]:
				zlist.append(row3[j - 1])
elif x == 'L':
	for i in range(len(ylist)):
		for j in range(10):
			if ylist[i] == row1[j]:
				zlist.append(row1[j + 1])
			elif ylist[i] == row2[j]:
				zlist.append(row2[j + 1])
			elif ylist[i] == row3[j]:
				zlist.append(row3[j + 1])
z = ''
for i in range(len(zlist)):
	z = z + zlist[i]
print(z)


import os
import sys
left = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'p': 'p', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', ';': ';', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/', '/': '/'}
right = {'q': 'q', 'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 'a': 'a', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'z': 'z', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
side = input()
s = input()
print()
for x in s:
	if side == 'R':
		v = str(right.get(x))
		print(v, end='')
	else:
		v = str(left.get(x))
		print(v, end='')


lr = input()
word = input().strip()
first = 'qwertyuiop'
second = 'asdfghjkl;'
third = 'zxcvbnm,./'
for letter in word:
	if letter in first:
		if lr == 'L':
			index_of_letter = first.index(letter)
			new_index = (index_of_letter + 1) % 10
			print(first[new_index], end='')
		else:
			index_of_letter = first.index(letter)
			new_index = (index_of_letter + 9) % 10
			print(first[new_index], end='')
	elif letter in second:
		if lr == 'L':
			index_of_letter = second.index(letter)
			new_index = (index_of_letter + 1) % 10
			print(second[new_index], end='')
		else:
			index_of_letter = second.index(letter)
			new_index = (index_of_letter + 9) % 10
			print(second[new_index], end='')
	elif lr == 'L':
		index_of_letter = third.index(letter)
		new_index = (index_of_letter + 1) % 10
		print(third[new_index], end='')
	else:
		index_of_letter = third.index(letter)
		new_index = (index_of_letter + 9) % 10
		print(third[new_index], end='')


from sys import stdin, stdout
keb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
state = input()
inp = input()
if state == 'R':
	for i in inp:
		stdout.write(keb[keb.index(i) - 1])
else:
	for i in inp:
		stdout.write(keb[keb.index(i) + 1])


x = 'qwertyuiopasdfghjkl;zxcvbnm,./qwertyuiopasdfghjkl;zxcvbnm,./'
c = str(input())
s = str(input())
if c == 'R':
	for i in range(len(s)):
		for j in range(1, len(x)):
			if s[i] == x[j]:
				print(x[j - 1], end='')
				break
if c == 'L':
	for i in range(len(s)):
		for j in range(len(x) - 1):
			if s[i] == x[j]:
				print(x[j + 1], end='')
				break


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = {}
a = input()
b = input()
c = ''
if a == 'R':
	for i in range(1, len(s)):
		x[s[i]] = s[i - 1]
	for item in b:
		c += x[item]
	print(c)
else:
	for i in range(len(s) - 1):
		x[s[i]] = s[i + 1]
	for item in b:
		c += x[item]
	print(c)


side = input()
s = input()
normal1 = 'qwertyuiop'
normal2 = 'asdfghjkl;'
normal3 = 'zxcvbnm,./'
rside1 = ' qwertyuio'
rside2 = ' asdfghjkl'
rside3 = ' zxcvbnm,.'
lside1 = 'wertyuiop '
lside2 = 'sdfghjkl; '
lside3 = 'xcvbnm,./ '
result = ''
for i in s:
	if i in normal1 and side == 'R':
		n = normal1.find(i)
		result += rside1[n]
	elif i in normal2 and side == 'R':
		n = normal2.find(i)
		result += rside2[n]
	elif i in normal3 and side == 'R':
		n = normal3.find(i)
		result += rside3[n]
	elif i in normal1 and side == 'L':
		n = normal1.find(i)
		result += lside1[n]
	elif i in normal2 and side == 'L':
		n = normal2.find(i)
		result += lside2[n]
	elif i in normal3 and side == 'L':
		n = normal3.find(i)
		result += lside3[n]
print(result)


a = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
b = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
c = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
n = input()
s2 = input()
s = list()
for i in range(len(s2)):
	s.append(s2[i])
if n == 'L':
	for i in range(len(s)):
		if s[i] in a:
			s[i] = a[a.index(s[i]) + 1]
		elif s[i] in b:
			s[i] = b[b.index(s[i]) + 1]
		else:
			s[i] = c[c.index(s[i]) + 1]
	for i in s:
		print(i, end='')
else:
	for i in range(len(s)):
		if s[i] in a:
			s[i] = a[a.index(s[i]) - 1]
		elif s[i] in b:
			s[i] = b[b.index(s[i]) - 1]
		else:
			s[i] = c[c.index(s[i]) - 1]
	for i in s:
		print(i, end='')


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
shift = input()
s = input()
news = ''
if shift == 'R':
	for i in s:
		if i in s1:
			u = s1.index(i)
			news += s1[u - 1]
		elif i in s2:
			u = s2.index(i)
			news += s2[u - 1]
		elif i in s3:
			u = s3.index(i)
			news += s3[u - 1]
	print(news)
else:
	for i in s:
		if i in s1:
			u = s1.index(i)
			news += s1[u + 1]
		elif i in s2:
			u = s2.index(i)
			news += s2[u + 1]
		elif i in s3:
			u = s3.index(i)
			news += s3[u + 1]
	print(news)


klav = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
pol = input()
if pol == 'R':
	pol = -1
else:
	pol = 1
f = input()
for i in f:
	for j in range(3):
		if i in klav[j]:
			d = klav[j].index(i)
			print(klav[j][d + pol], end='')


letter = input()
text = input()
n = ''
t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = len(t)
k = len(text)
i = 0
if letter == 'R':
	for i in range(0, k):
		for j in range(0, l):
			if text[i] == t[j]:
				n = n + t[j - 1]
elif letter == 'L':
	for i in range(0, k):
		for j in range(0, l):
			if text[i] == t[j]:
				n = n + t[j + 1]
print(n)


d = input()
s = input()
l = list('qwertyuiopasdfghjkl;zxcvbnm,./')
x = ''
if d == 'R':
	for i in range(len(s)):
		x += l[l.index(s[i]) - 1]
else:
	for i in range(len(s)):
		x += l[l.index(s[i]) + 1]
print(x)


a = input()
s = input()
s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
t = -1 if a == 'R' else 1
s2 = ''
for i in s:
	s2 += s1[s1.index(i) + t]
print(s2)


keys = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
map_index = dict()
ind = 0
for key in keys:
	for i in range(len(key)):
		map_index[key[i]] = (ind, i)
	ind += 1
dx = -1 if input() == 'R' else 1
s = input()
res = ''
for code in s:
	(row, index) = map_index[code]
	res += keys[row][index + dx]
print(res)


def decode(s, shift):
	qwerty = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	decoded = ''
	shift = -1 if shift == 'L' else 1
	for ch in s:
		decoded += qwerty[qwerty.find(ch) - shift]
	return decoded

def main():
	(shift, s) = (input(), input())
	print(decode(s, shift))
main()


st = 'qwertyuiopasdfghjkl;zxcvbnm,./'
m = input()
n = input()
if m == 'R':
	for i in n:
		x = st.index(i) - 1
		print(st[x], end='')
elif m == 'L':
	for i in n:
		x = st.index(i) + 1
		print(st[x], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s1 = input()
s2 = input()
l2 = list(s2)
if s1 == 'R':
	for i in range(len(s2)):
		for j in range(len(s)):
			if s2[i] == s[j]:
				l2[i] = s[j - 1]
else:
	for i in range(len(s2)):
		for j in range(len(s)):
			if s2[i] == s[j]:
				l2[i] = s[j + 1]
s3 = ''.join(l2)
print(s3)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
st = input()
o = ''
if d == 'R':
	for i in st:
		o = o + s[s.find(i) - 1]
else:
	for i in st:
		o = o + s[s.find(i) + 1]
print(o)


s = 'qwertyuiop asdfghjkl; zxcvbnm,./'
mod = input()
txt = input()
if mod == 'R':
	pre = {s[i]: s[i - 1] for i in range(1, len(s))}
else:
	pre = {s[i]: s[i + 1] for i in range(0, len(s) - 1)}
print(''.join((pre[c] for c in txt)))


s = input()
k = list(input())
p = list('qwertyuiopasdfghjkl;zxcvbnm,./')
for i in range(len(k)):
	a = p.index(k[i])
	if s == 'R':
		k[i] = p[a - 1]
	else:
		k[i] = p[a + 1]
print(''.join(k))


key_board = 'qwertyuiopasdfghjkl;zxcvbnm,./'
step = -1 if input() == 'R' else 1
(sq, s) = (input(), '')
for i in sq:
	s += key_board[key_board.find(i) + step]
print(s)


up = {'q': 0, 'w': 1, 'e': 2, 'r': 3, 't': 4, 'y': 5, 'u': 6, 'i': 7, 'o': 8, 'p': 9}
mid = {'a': 0, 's': 1, 'd': 2, 'f': 3, 'g': 4, 'h': 5, 'j': 6, 'k': 7, 'l': 8, ';': 9}
down = {'z': 0, 'x': 1, 'c': 2, 'v': 3, 'b': 4, 'n': 5, 'm': 6, ',': 7, '.': 8, '/': 9}
s1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
s2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
s3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
n = str(input())
s = str(input())
s = list(s)
res = ''
if n == 'R':
	for i in s:
		try:
			if i in up:
				res = res + s1[up[i] - 1]
			if i in mid:
				res = res + s2[mid[i] - 1]
			if i in down:
				res = res + s3[down[i] - 1]
		except:
			continue
if n == 'L':
	for i in s:
		try:
			if i in up:
				res = res + s1[up[i] + 1]
			if i in mid:
				res = res + s2[mid[i] + 1]
			if i in down:
				res = res + s3[down[i] + 1]
		except:
			continue
print(res)


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
m = input()
t = input()
if m == 'R':
	k = -1
else:
	k = 1
for i in range(len(t)):
	print(keys[keys.index(t[i]) + k], end='')


n = input().upper()
s = input().lower()
qwerty = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = ''
if n == 'R':
	for i in s:
		ind = qwerty.find(i)
		b += qwerty[ind - 1]
elif n == 'L':
	for i in s:
		ind = qwerty.find(i)
		b += qwerty[ind + 1]
print(b)


stri = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
s = input()
list1 = ''
if n == 'R':
	for i in s:
		list1 += stri[stri.index(i) - 1]
else:
	for i in s:
		list1 += stri[stri.index(i) + 1]
print(list1)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
line = ''
shift = input()
str1 = input()
if shift == 'R':
	for i in str1:
		x = s.index(i)
		line += s[x - 1]
elif shift == 'L':
	for i in str1:
		x = s.index(i)
		line += s[x + 1]
print(line)


keyboard_string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
if shift == 'L':
	shift = 1
else:
	shift = -1
mod_string = input()
output_string = ''
for char in mod_string:
	output_string = output_string + keyboard_string[keyboard_string.find(char) + shift]
print(output_string)


clav = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
b = input()
if a == 'R':
	a = -1
else:
	a = 1
r = ''
for x in range(len(b)):
	for z in range(30):
		if clav[z] == b[x]:
			r += clav[z + a]
print(r)


d = input()
if d == 'L':
	j = 1
else:
	j = -1
text = input()
first_row = 'qwertyuiop'
second_row = 'asdfghjkl;'
third_row = 'zxcvbnm,./'
ans = ''
for i in text:
	if i in first_row:
		ans += first_row[first_row.index(i) + j]
	elif i in second_row:
		ans += second_row[second_row.index(i) + j]
	elif i in third_row:
		ans += third_row[third_row.index(i) + j]
print(ans)


b = input()
a = input()
h = []
e = []
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if b == 'R':
	for i in a:
		f = c.find(i)
		h.append(f - 1)
	for i in h:
		e.append(c[i])
	for i in e:
		print(i, end='')
elif b == 'L':
	for i in a:
		f = c.find(i)
		h.append(f + 1)
	for i in h:
		e.append(c[i])
	for i in e:
		print(i, end='')


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
DL = {}
DR = {}
l = 10
for i in range(1, l):
	DL[s1[i]] = s1[i - 1]
	DL[s2[i]] = s2[i - 1]
	DL[s3[i]] = s3[i - 1]
	DR[s1[i - 1]] = s1[i]
	DR[s2[i - 1]] = s2[i]
	DR[s3[i - 1]] = s3[i]
c = input()
s = input()
if c == 'R':
	for i in s:
		print(DL[i], end='')
else:
	for i in s:
		print(DR[i], end='')


side = input()
string = input()
result = ''
chars = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if side == 'R':
	for i in range(len(string)):
		result += chars[chars.index(string[i]) - 1]
else:
	for i in range(len(string)):
		result += chars[chars.index(string[i]) + 1]
print(result)


n = input()
s = input()
l1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
l2 = list('asdfghjkl;')
l3 = list('zxcvbnm,./')
for i in s:
	if i in l1:
		print(l1[l1.index(i) - 1], end='') if n == 'R' else print(l1[l1.index(i) + 1], end='')
	elif i in l2:
		print(l2[l2.index(i) - 1], end='') if n == 'R' else print(l2[l2.index(i) + 1], end='')
	elif i in l3:
		print(l3[l3.index(i) - 1], end='') if n == 'R' else print(l3[l3.index(i) + 1], end='')


from sys import stdin, stdout
from collections import defaultdict
import heapq

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()
INF = 10000000000.0
c = get_string()
s = get_string()
ar = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
for i in s:
	for j in range(len(ar)):
		if i == ar[j]:
			if c == 'R':
				ans += ar[j - 1]
			else:
				ans += ar[j + 1]
print(ans)


row1 = 'qwertyuiop'
row2 = 'asdfghjkl;'
row3 = 'zxcvbnm,./'
s = input()
m = input()
correct = ''
for ch in m:
	if s == 'R':
		if ch in row1:
			correct += row1[row1.index(ch) - 1]
		elif ch in row2:
			correct += row2[row2.index(ch) - 1]
		else:
			correct += row3[row3.index(ch) - 1]
	elif ch in row1:
		correct += row1[row1.index(ch) + 1]
	elif ch in row2:
		correct += row2[row2.index(ch) + 1]
	else:
		correct += row3[row3.index(ch) + 1]
print(correct)


direction = input()
sequence = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
offset = 1 if direction == 'R' else -1
for c in sequence:
	position = keyboard.find(c)
	print(keyboard[position - offset], end='')
print()


n = input().upper()
a = input()
b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in a:
	if n == 'R':
		d = b.find(i)
		print(b[d - 1], end='')
	elif n == 'L':
		f = b.find(i)
		print(b[f + 1], end='')


def right(word):
	answer = ''
	letters = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
	for pos in range(len(word)):
		answer += letters[letters.index(word[pos]) - 1]
	return answer

def left(word):
	answer = ''
	letters = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
	for pos in range(len(word)):
		answer += letters[letters.index(word[pos]) + 1]
	return answer
value = input()
word = input()
letters = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if value == 'R':
	print(right(word))
else:
	print(left(word))


dir = str(input())
l1 = 'qwertyuiop'
k1 = list(l1)
l2 = 'asdfghjkl;'
k2 = list(l2)
l3 = 'zxcvbnm,./'
k3 = list(l3)
i = str(input())
k4 = list(i)
l = []
for j in range(0, len(i)):
	if k4[j] in k1:
		x = k1.index(k4[j])
		if dir == 'R':
			l.append(k1[x - 1])
		elif dir == 'L':
			l.append(k1[x + 1])
	if k4[j] in k2:
		x = k2.index(k4[j])
		if dir == 'R':
			l.append(k2[x - 1])
		elif dir == 'L':
			l.append(k2[x + 1])
	if k4[j] in k3:
		x = k3.index(k4[j])
		if dir == 'R':
			l.append(k3[x - 1])
		elif dir == 'L':
			l.append(k3[x + 1])
print(''.join([str(m) for m in l]))


a = input()
b = list(input())
(q, w, e) = ('qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./')
for i in range(len(b)):
	j = -1
	for k in range(len(q)):
		if q[k] == b[i]:
			j = k
	if j != -1:
		if a == 'R':
			print(q[j - 1], end='')
		else:
			print(q[j + 1], end='')
	j = -1
	for k in range(len(w)):
		if w[k] == b[i]:
			j = k
	if j != -1:
		if a == 'R':
			print(w[j - 1], end='')
		else:
			print(w[j + 1], end='')
	j = -1
	for k in range(len(e)):
		if e[k] == b[i]:
			j = k
	if j != -1:
		if a == 'R':
			print(e[j - 1], end='')
		else:
			print(e[j + 1], end='')


a = input()
l = input()
S = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'R':
	for i in range(len(l)):
		k = S.find(l[i])
		print(S[k - 1], end='')
if a == 'L':
	for i in range(len(l)):
		k = S.find(l[i])
		print(S[k + 1], end='')


ch = input().strip()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
inp = input().strip()
for x in inp:
	print(s[s.index(x) - 1] if ch == 'R' else s[s.index(x) + 1], end='')


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
sentence = input()
res = ''
if direction == 'R':
	for char in sentence:
		res += keys[keys.index(char) - 1]
else:
	for char in sentence:
		res += keys[keys.index(char) + 1]
print(res)


k1 = ('q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p')
k2 = ('a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';')
k3 = ('z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/')
pos = input()
text = input()
temp = ''
if pos == 'R':
	for letter in text:
		if letter in k1:
			temp += k1[k1.index(letter) - 1]
		elif letter in k2:
			temp += k2[k2.index(letter) - 1]
		else:
			temp += k3[k3.index(letter) - 1]
else:
	for letter in text:
		if letter in k1:
			temp += k1[k1.index(letter) + 1]
		elif letter in k2:
			temp += k2[k2.index(letter) + 1]
		else:
			temp += k3[k3.index(letter) + 1]
print(temp)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
t = input()
s = input()
x = []
if t == 'R':
	for i in s:
		if i in s1:
			a = s1.index(i)
			x.append(s1[a - 1])
		elif i in s2:
			a = s2.index(i)
			x.append(s2[a - 1])
		else:
			a = s3.index(i)
			x.append(s3[a - 1])
else:
	for i in s:
		if i in s1:
			a = s1.index(i)
			x.append(s1[a + 1])
		elif i in s2:
			a = s2.index(i)
			x.append(s2[a + 1])
		else:
			a = s3.index(i)
			x.append(s3[a + 1])
print(''.join(x))


shift = input()
s = input()
layout = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
for i in s:
	if shift == 'R':
		res += layout[layout.index(i) - 1]
	else:
		res += layout[layout.index(i) + 1]
print(res)


w = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
if w == 'R':
	b = [k[k.index(i) - 1] for i in a]
else:
	b = [k[k.index(i) + 1] for i in a]
print(''.join(b))


n = input()
s = input()
mas = 'qwertyuiopasdfghjkl;zxcvbnm,./'
news = ''
for i in s:
	if n == 'R':
		news += mas[mas.index(i) - 1]
	else:
		news += mas[mas.index(i) + 1]
print(news)


line1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = len(line1)
direction = str(input())
line = str(input())
if direction == 'R':
	for a in line:
		x = line1.find(a)
		print(line1[x - 1], end='')
else:
	for a in line:
		x = line1.find(a)
		if x == n - 1:
			print(line1[0], end='')
		else:
			print(line1[x + 1], end='')


shift = input()
s = input()
keyBoard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
for i in range(len(s)):
	if shift == 'R':
		res += keyBoard[keyBoard.find(s[i]) - 1]
	elif shift == 'L':
		res += keyBoard[keyBoard.find(s[i]) + 1]
print(res)


direction = input()
s = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
for i in range(len(s)):
	for j in range(len(keyboard)):
		if keyboard[j] == s[i]:
			if direction == 'R':
				ans += keyboard[j - 1]
			else:
				ans += keyboard[j + 1]
			break
print(ans)


letters = [''] + list('qwertyuiop') + [''] + list('asdfghjkl;') + [''] + list('zxcvbnm,./') + ['']
shift = -1 if input() == 'R' else 1
s = ''
for letter in input():
	s += letters[letters.index(letter) + shift]
print(s)


shift = -1 if input() == 'R' else 1
kbd = 'qwertyuiopasdfghjkl;zxcvbnm,./'
print(''.join([kbd[kbd.index(si) + shift] for si in input()]))


shift = input()
seq = input()
symbols = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
res = ''
for i in range(len(seq)):
	currChar = seq[i]
	for j in symbols:
		if currChar in j:
			currIndex = j.find(currChar)
			if shift == 'R':
				newChar = j[currIndex - 1]
			else:
				newChar = j[currIndex + 1]
			res += newChar
print(res)


s = []
s.append('qwertyuiop')
s.append('asdfghjkl;')
s.append('zxcvbnm,./')
x = input()
y = input()
for item in y:
	for i in range(3):
		for j in range(len(s[i])):
			if s[i][j] == item:
				if x == 'R':
					print(s[i][j - 1], end='')
				else:
					print(s[i][j + 1], end='')
print()


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = (-1, 1)[input() == 'R']
f = lambda x: k[k.index(x) - d]
print(''.join(map(f, input())))


x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
b = input()
if a == 'R':
	for i in range(len(b)):
		c = x.index(b[i])
		print(x[c - 1], end='')
if a == 'L':
	for i in range(len(b)):
		c = x.index(b[i])
		print(x[c + 1], end='')


alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
step = input()
text = input()
l = ''
for i in text:
	symbol = alpha.index(i)
	if step == 'R':
		symbol -= 1
	else:
		symbol += 1
	l = l + alpha[symbol]
print(l)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
if input() == 'R':
	table = str.maketrans(s1[1:] + s2[1:] + s3[1:], s1[:-1] + s2[:-1] + s3[:-1])
else:
	table = str.maketrans(s1[:-1] + s2[:-1] + s3[:-1], s1[1:] + s2[1:] + s3[1:])
print(input().translate(table))


chars = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'", 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
dir = input()
words = list(input())
correct = ''
if dir == 'R':
	for i in words:
		correct += chars[chars.index(i) - 1]
else:
	for i in words:
		correct += chars[chars.index(i) + 1]
print(correct)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
d = input()
i = 0
if d == 'L':
	i = 1
else:
	i = -1
s = input()
r = ''
for x in s:
	if x in a:
		r += a[a.index(x) + i]
	elif x in b:
		r += b[b.index(x) + i]
	elif x in c:
		r += c[c.index(x) + i]
print(r)


s1 = input()
s2 = input()
s3 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s4 = []
if s1 == 'R':
	for i in range(len(s2)):
		for j in range(len(s3)):
			if s2[i] == s3[j]:
				s4.append(s3[j - 1])
if s1 == 'L':
	for i in range(len(s2)):
		for j in range(len(s3)):
			if s2[i] == s3[j]:
				s4.append(s3[j + 1])
for i in range(len(s4)):
	print(s4[i], end='')


r = input()
s = input()
k1 = 'qwertyuiop'
k2 = 'asdfghjkl;'
k3 = 'zxcvbnm,./'
totk = k1 + k2 + k3
ans = ''
if r == 'R':
	for i in range(len(s)):
		ans = ans + totk[totk.index(s[i]) - 1]
else:
	for i in range(len(s)):
		ans += totk[totk.index(s[i]) + 1]
print(ans)


base_str = 'qwertyuiopasdfghjkl;zxcvbnm,./'
mode_select = input().strip()
str_in = input().strip()
for x in base_str[1:] if mode_select == 'R' else base_str[-2::-1]:
	str_in = str_in.replace(x, base_str[(base_str.find(x) + (-1 if mode_select == 'R' else 1)) % len(base_str)])
print(str_in)


n = input()
s = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = 0
c = ''
if n == 'R':
	for i in s:
		b = a.index(i)
		c += a[b - 1]
	print(c)
else:
	for i in s:
		b = a.index(i)
		c += a[b + 1]
	print(c)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
t = input()
s = input()
if t == 'R':
	for i in s:
		if i in a:
			k = a.find(i)
			print(a[k - 1], end='')
		if i in b:
			k = b.find(i)
			print(b[k - 1], end='')
		if i in c:
			k = c.find(i)
			print(c[k - 1], end='')
if t == 'L':
	for i in s:
		if i in a:
			k = a.find(i)
			print(a[k + 1], end='')
		if i in b:
			k = b.find(i)
			print(b[k + 1], end='')
		if i in c:
			k = c.find(i)
			print(c[k + 1], end='')


KeyBoard = list("qwertyuiop[]asdfghjkl;'zxcvbnm,./")
Shift = input()
Sentence = input()
if Shift == 'R':
	for i in Sentence:
		print(KeyBoard[KeyBoard.index(i) - 1], end='')
	exit()
for i in Sentence:
	print(KeyBoard[KeyBoard.index(i) + 1], end='')


Key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
s = input()
d = ''
if x == 'L':
	for i in s:
		for k in range(len(Key)):
			if i == Key[k]:
				d += Key[k + 1]
else:
	for i in s:
		for k in range(len(Key)):
			if i == Key[k]:
				d += Key[k - 1]
print(d)


t = input()
q = input()
arr = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
o = ''
if t == 'R':
	for val in q:
		for i in range(len(arr)):
			for j in range(len(arr[0])):
				if arr[i][j] == val:
					o += arr[i][j - 1]
elif t == 'L':
	for val in q:
		for i in range(len(arr)):
			for j in range(len(arr[0])):
				if arr[i][j] == val:
					o += arr[i][j + 1]
print(o)


def main():
	t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	c = input()
	s = input()
	d = -1 if c == 'R' else 1
	new_s = []
	for ch in s:
		new_s.append(t[t.index(ch) + d])
	print(''.join(new_s))
main()


n1 = str(input())
s = str(input())
if n1 == 'R':
	n11 = 1
else:
	n11 = -1
orig_txt = ''
or_bukv = ''
kl = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(s)):
	or_bukv = kl[kl.find(s[i]) - n11]
	orig_txt = orig_txt + or_bukv
print(orig_txt)


s = "qwertyuiop[]\\asdfghjkl;'zxcvbnm,./"
shift = input()
string = input()
if shift == 'L':
	res = ''
	for i in string:
		res += s[s.index(i) + 1]
	print(res)
else:
	res = ''
	for i in string:
		res += s[s.index(i) - 1]
	print(res)


def func(n):
	string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	k = input()
	ans = ''
	if n == 'R':
		for i in k:
			ans += string[string.index(i) - 1]
	else:
		for i in k:
			ans += string[string.index(i) + 1]
	print(ans)
n = input()
func(n)


p = input()
s = input()
string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
for i in range(len(s)):
	ind = string.find(s[i])
	if p[0] == 'R':
		res = res + string[ind - 1]
	else:
		res = res + string[ind + 1]
print(res)


arr = 'qwertyuiopasdfghjkl;zxcvbnm,./'
dic = {'q': ['', 'w'], '/': ['.', '']}
for i in range(1, len(arr) - 1):
	dic[arr[i]] = [arr[i - 1], arr[i + 1]]
shift = input()
word = input()
ans = []
if shift == 'L':
	for e in word:
		ans.append(dic[e][1])
else:
	for e in word:
		ans.append(dic[e][0])
print(''.join(ans))


dir = input()
str = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in input():
	if dir == 'R':
		print(str[str.find(i) - 1], end='')
	else:
		print(str[str.find(i) + 1], end='')


dir = input()
cad = input()
if dir == 'R':
	dir = -1
else:
	dir = 1
line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
for char in cad:
	if line1.find(char) != -1:
		print(line1[line1.find(char) + dir], end='')
	elif line2.find(char) != -1:
		print(line2[line2.find(char) + dir], end='')
	elif line3.find(char) != -1:
		print(line3[line3.find(char) + dir], end='')


lil = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'o': 'p', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'j': 'k', 'k': 'l', 'l': ';', 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/'}
lir = {'w': 'q', 'e': 'w', 'r': 'e', 't': 'r', 'y': 't', 'u': 'y', 'i': 'u', 'o': 'i', 'p': 'o', 's': 'a', 'd': 's', 'f': 'd', 'g': 'f', 'h': 'g', 'j': 'h', 'k': 'j', 'l': 'k', ';': 'l', 'x': 'z', 'c': 'x', 'v': 'c', 'b': 'v', 'n': 'b', 'm': 'n', ',': 'm', '.': ',', '/': '.'}
m = input()
str = input()
li = []
for i in range(len(str)):
	li.append(str[i])
if m == 'R':
	for i in range(len(str)):
		li[i] = lir[li[i]]
else:
	for i in range(len(str)):
		li[i] = lil[li[i]]
print(''.join(li))


def iinput(string=''):
	print(string, end='')
	return int(input())

def dbg(*vartuple):
	return
	print('DBG:', *vartuple)
keyboard = '\nqwertyuiop\nasdfghjkl;\nzxcvbnm,./\n'
shift = 'R L'.index(input()) - 1
dbg(shift)
for now in input():
	for num_key in range(len(keyboard)):
		if keyboard[num_key] == now:
			print(keyboard[num_key + shift], end='')


a = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
d = input()
s = input()
r = ''
for i in s:
	ia = []
	for j in a:
		if i in j:
			for k in j:
				ia.append(k)
	if d == 'R':
		r += ia[ia.index(i) - 1]
	else:
		r += ia[ia.index(i) + 1]
print(r)


char = input()
s = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
res = []
l = len(s)
if char == 'R':
	for i in range(l):
		for j in range(10):
			if s[i] == a[j]:
				res.append(a[j - 1])
			elif s[i] == b[j]:
				res.append(b[j - 1])
			elif s[i] == c[j]:
				res.append(c[j - 1])
elif char == 'L':
	for i in range(l):
		for j in range(9):
			if s[i] == a[j]:
				res.append(a[j + 1])
			elif s[i] == b[j]:
				res.append(b[j + 1])
			elif s[i] == c[j]:
				res.append(c[j + 1])
for elem in res:
	print(elem, end='')


l = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
l1 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
l3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
s = str(input())
d = str(input())
p = ''
if s[0] == 'R':
	for i in range(0, len(d)):
		if d[i] in l:
			p = p + l[l.index(d[i]) - 1]
		elif d[i] in l1:
			p = p + l1[l1.index(d[i]) - 1]
		elif d[i] in l3:
			p = p + l3[l3.index(d[i]) - 1]
else:
	for i in range(0, len(d)):
		if d[i] in l:
			p = p + l[l.index(d[i]) + 1]
		elif d[i] in l1:
			p = p + l1[l1.index(d[i]) + 1]
		elif d[i] in l3:
			p = p + l3[l3.index(d[i]) + 1]
print(p)


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
z = []
if a == 'R':
	for i in range(len(b)):
		d = c.index(b[i])
		v = c[d - 1]
		z.append(v)
else:
	for i in range(len(b)):
		d = c.index(b[i])
		v = c[d + 1]
		z.append(v)
print(''.join(z))


def main():
	x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	a = input()
	out = ''
	inp = input()
	for i in range(len(inp)):
		if a == 'R':
			out += x[x.find(inp[i]) - 1]
		else:
			out += x[x.find(inp[i]) + 1]
	print(out)
main()


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
char = input()
s1 = input()
res = ''
if char == 'R':
	for i in range(len(s1)):
		res = res + s[s.index(s1[i]) - 1]
else:
	for i in range(len(s1)):
		res = res + s[s.index(s1[i]) + 1]
print(res)


i1 = input()
n = input()
s = 'qwertyuiop'
s1 = 'asdfghjkl;'
s2 = 'zxcvbnm,./'
t = ''
for i in n:
	if i in s and i1 == 'R':
		t = t + s[s.find(i) - 1]
	if i in s and i1 == 'L':
		t = t + s[s.find(i) + 1]
	if i in s1 and i1 == 'R':
		t = t + s1[s1.find(i) - 1]
	if i in s1 and i1 == 'L':
		t = t + s1[s1.find(i) + 1]
	if i in s2 and i1 == 'L':
		t = t + s2[s2.find(i) + 1]
	if i in s2 and i1 == 'R':
		t = t + s2[s2.find(i) - 1]
print(t)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
if input() == 'R':
	sdvig = -1
else:
	sdvig = 1
s = input()
for i in range(len(s)):
	if s[i] in s1:
		print(s1[s1.find(s[i]) + sdvig], sep='', end='')
	elif s[i] in s2:
		print(s2[s2.find(s[i]) + sdvig], sep='', end='')
	else:
		print(s3[s3.find(s[i]) + sdvig], sep='', end='')


str1 = 'qwertyuiop'
str2 = 'asdfghjkl;'
str3 = 'zxcvbnm,./'
str_f = str1 + str2 + str3
fun = input()
str_in = input()
if fun == 'R':
	for i in range(len(str_in)):
		if str_in[i] != 'q' and str_in[i] != 'z' and (str_in[i] != 'a'):
			num = str_f.find(str_in[i])
			print(str_f[num - 1], end='')
elif fun == 'L':
	for i in range(len(str_in)):
		num = str_f.find(str_in[i])
		print(str_f[num + 1], end='')
print()


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
sequence = input()
corrected_sequence = ''
if shift == 'R':
	for key in sequence:
		corrected_sequence += keys[keys.index(key) - 1]
else:
	for key in sequence:
		corrected_sequence += keys[keys.index(key) + 1]
print(corrected_sequence)


lis = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ch = input()
string = str(input())
if ch == 'R':
	s = ''
	for i in range(len(string)):
		c = string[i]
		k = lis.index(c)
		k -= 1
		s += lis[k]
	print(s)
else:
	s = ''
	for i in range(len(string)):
		c = string[i]
		k = lis.index(c)
		k += 1
		s += lis[k]
	print(s)


k = input()
s = list(input())
l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'

def left(s, l1, l2, l3):
	for i in range(len(s)):
		if s[i] in l1:
			s[i] = l1[l1.index(s[i]) + 1]
		elif s[i] in l2:
			s[i] = l2[l2.index(s[i]) + 1]
		else:
			s[i] = l3[l3.index(s[i]) + 1]
	return s

def right(s, l1, l2, l3):
	for i in range(len(s)):
		if s[i] in l1:
			s[i] = l1[l1.index(s[i]) - 1]
		elif s[i] in l2:
			s[i] = l2[l2.index(s[i]) - 1]
		else:
			s[i] = l3[l3.index(s[i]) - 1]
	return s
if k == 'L':
	print(''.join(left(s, l1, l2, l3)))
else:
	print(''.join(right(s, l1, l2, l3)))


n = input()
w = input()
j = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in w:
	if n == 'R':
		print(j[j.index(i) - 1], end='')
	else:
		print(j[j.index(i) + 1], end='')


t = input()
a = input()
k1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if t == 'R':
	for i in range(len(a)):
		print(k1[k1.index(a[i]) - 1], end='')
elif t == 'L':
	for i in range(len(a)):
		print(k1[k1.index(a[i]) + 1], end='')


list1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
str1 = input()
str2 = input()
list2 = []
if str1 is 'R':
	for i in str2:
		x = list1.index(i)
		y = list1[x - 1]
		list2.append(y)
else:
	for i in str2:
		x = list1.index(i)
		y = list1[x + 1]
		list2.append(y)
str3 = ''
for i in list2:
	str3 += i
print(str3)


k1 = 'qwertyuiop'
k2 = 'asdfghjkl;'
k3 = 'zxcvbnm,./'
k = [k1, k2, k3]
if input() == 'R':
	x = -1
else:
	x = 1
word = input()
w1 = ''
for l in word:
	for y in k:
		if l in y:
			w1 += y[y.find(l) + x]
print(w1)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline().strip())
if get_string() == 'R':
	temp = -1
else:
	temp = 1
inp = get_string()
string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
for i in inp:
	res += string[string.index(i) + temp]
print(res)


q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
a = input()
if d == 'R':
	for i in a:
		print(q[q.index(i) - 1], end='')
else:
	for i in a:
		print(q[q.index(i) + 1], end='')


import sys
file = sys.stdin
shift = file.readline().strip('\n')
mes = file.readline().strip('\n')
ofs = 0
if shift == 'R':
	ofs = -1
else:
	ofs = +1
up = 'qwertyuiop'
mid = 'asdfghjkl;'
bot = 'zxcvbnm,./'
new_mes = []
for (i, c) in enumerate(mes):
	if c in up:
		new_mes.append(up[up.index(c) + ofs])
	elif c in mid:
		new_mes.append(mid[mid.index(c) + ofs])
	else:
		new_mes.append(bot[bot.index(c) + ofs])
new_mes = ''.join(new_mes)
print(new_mes)


rows = ('qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./')
d = input()
if d == 'L':
	offset = 1
else:
	offset = -1
pos = {}
for (i, r) in enumerate(rows):
	for (j, c) in enumerate(r):
		pos[c] = (i, j)
for c in input():
	(i, j) = pos[c]
	print(rows[i][j + offset], end='')
print()


dir = input()
s = input()
res = []
if dir == 'R':
	for i in s:
		if i == 'w':
			res.append('q')
		if i == 'e':
			res.append('w')
		if i == 'r':
			res.append('e')
		if i == 't':
			res.append('r')
		if i == 'y':
			res.append('t')
		if i == 'u':
			res.append('y')
		if i == 'i':
			res.append('u')
		if i == 'o':
			res.append('i')
		if i == 'p':
			res.append('o')
		if i == 's':
			res.append('a')
		if i == 'd':
			res.append('s')
		if i == 'f':
			res.append('d')
		if i == 'g':
			res.append('f')
		if i == 'h':
			res.append('g')
		if i == 'j':
			res.append('h')
		if i == 'k':
			res.append('j')
		if i == 'l':
			res.append('k')
		if i == ';':
			res.append('l')
		if i == 'x':
			res.append('z')
		if i == 'c':
			res.append('x')
		if i == 'v':
			res.append('c')
		if i == 'b':
			res.append('v')
		if i == 'n':
			res.append('b')
		if i == 'm':
			res.append('n')
		if i == ',':
			res.append('m')
		if i == '.':
			res.append(',')
		if i == '/':
			res.append('.')
if dir == 'L':
	for i in s:
		if i == 'q':
			res.append('w')
		if i == 'w':
			res.append('e')
		if i == 'e':
			res.append('r')
		if i == 'r':
			res.append('t')
		if i == 't':
			res.append('y')
		if i == 'y':
			res.append('u')
		if i == 'u':
			res.append('i')
		if i == 'i':
			res.append('o')
		if i == 'o':
			res.append('p')
		if i == 'a':
			res.append('s')
		if i == 's':
			res.append('d')
		if i == 'd':
			res.append('f')
		if i == 'f':
			res.append('g')
		if i == 'g':
			res.append('h')
		if i == 'h':
			res.append('j')
		if i == 'j':
			res.append('k')
		if i == 'k':
			res.append('l')
		if i == 'l':
			res.append(';')
		if i == 'z':
			res.append('x')
		if i == 'x':
			res.append('c')
		if i == 'c':
			res.append('v')
		if i == 'v':
			res.append('b')
		if i == 'b':
			res.append('n')
		if i == 'n':
			res.append('m')
		if i == 'm':
			res.append(',')
		if i == ',':
			res.append('.')
		if i == '.':
			res.append('/')
print(''.join(res))


n = input()
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if n == 'R':
	s = input()
	for i in range(len(s)):
		y = l.find(s[i])
		print(l[y - 1], end='')
else:
	s = input()
	for i in range(len(s)):
		y = l.find(s[i])
		print(l[y + 1], end='')


s = input()
t = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
x = ''
for i in t:
	if i in a:
		p = a.index(i)
		if s == 'R':
			if p == 0:
				x += a[0]
			else:
				x += a[p - 1]
		elif p == len(a) - 1:
			x += a[-1]
		else:
			x += a[p + 1]
	elif i in b:
		p = b.index(i)
		if s == 'R':
			if p == 0:
				x += b[0]
			else:
				x += b[p - 1]
		elif p == len(b) - 1:
			x += b[-1]
		else:
			x += b[p + 1]
	else:
		p = c.index(i)
		if s == 'R':
			if p == 0:
				x += c[0]
			else:
				x += c[p - 1]
		elif p == len(c) - 1:
			x += c[-1]
		else:
			x += c[p + 1]
print(x)


top = 'qwertyuiop'
mid = 'asdfghjkl;'
bot = 'zxcvbnm,./'
shift = input()
txt = input()
ntxt = []
if shift == 'R':
	shift = -1
else:
	shift = 1
for letter in txt:
	ind = top.find(letter)
	if ind == -1:
		ind = mid.find(letter)
		if ind == -1:
			ind = bot.find(letter)
			ntxt.append(bot[ind + shift])
		else:
			ntxt.append(mid[ind + shift])
	else:
		ntxt.append(top[ind + shift])
print(''.join(ntxt))


string1 = list('qwertyuiop')
string2 = list('asdfghjkl;')
string3 = list('zxcvbnm,./')
list1 = string1 + string2 + string3
shift = input()
result = ''
c = -1 if shift == 'R' else 1
str = input()
for i in str:
	result += list1[list1.index(i) + c]
print(result)


direction = input()
message = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for c in message:
	print(keyboard[keyboard.index(c) - int(direction == 'R') + int(direction == 'L')], end='')


d = input()
m = input()
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	for x in l:
		if x in m:
			m = m.replace(x, l[l.index(x) - 1])
if d == 'L':
	for x in l[::-1]:
		if x in m:
			m = m.replace(x, l[l.index(x) + 1])
print(m)


sym = input()
l1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
l2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
l3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
mat = []
mat.append(l1)
mat.append(l2)
mat.append(l3)
s = input()
if sym == 'R':
	for i in s:
		for j in mat:
			if i in j:
				print(j[j.index(i) - 1], end='')
if sym == 'L':
	for i in s:
		for j in mat:
			if i in j:
				print(j[j.index(i) + 1], end='')


def keyboard(d, s):
	k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	if d == 'L':
		shift = 1
	else:
		shift = -1
	r = ''
	for i in range(len(s)):
		r += k[k.index(s[i]) + shift]
	return r
d = input().strip()
s = input().strip()
print(keyboard(d, s))


c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = -1 if input() == 'R' else 1
print(''.join(list(map(lambda x: c[c.index(x) + d], input()))))


k = input()
if k == 'R':
	i = -1
else:
	i = 1
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = list(s)
s1 = input()
s1 = list(s1)
for j in range(len(s1)):
	l = s.index(s1[j])
	print(s[l + i], end='')


se = 'qwertyuiop asdfghjkl; zxcvbnm,./'
se = list(se)
ch = input()
st = list(input())
s = ''
if ch == 'R':
	for x in st:
		s = s + se[se.index(x) - 1]
else:
	for x in st:
		s = s + se[se.index(x) + 1]
print(s)


d = input()
x = input()
i = 0
s = ''
while i < len(x):
	if d == 'R':
		if x[i] == 'w':
			s = s + 'q'
		elif x[i] == 'e':
			s = s + 'w'
		elif x[i] == 'r':
			s = s + 'e'
		elif x[i] == 't':
			s = s + 'r'
		elif x[i] == 'y':
			s = s + 't'
		elif x[i] == 'u':
			s = s + 'y'
		elif x[i] == 'i':
			s = s + 'u'
		elif x[i] == 'o':
			s = s + 'i'
		elif x[i] == 'p':
			s = s + 'o'
		elif x[i] == '[':
			s = s + 'p'
		elif x[i] == 's':
			s = s + 'a'
		elif x[i] == 'd':
			s = s + 's'
		elif x[i] == 'f':
			s = s + 'd'
		elif x[i] == 'g':
			s = s + 'f'
		elif x[i] == 'h':
			s = s + 'g'
		elif x[i] == 'j':
			s = s + 'h'
		elif x[i] == 'k':
			s = s + 'j'
		elif x[i] == 'l':
			s = s + 'k'
		elif x[i] == ';':
			s = s + 'l'
		elif x[i] == 'x':
			s = s + 'z'
		elif x[i] == 'c':
			s = s + 'x'
		elif x[i] == 'v':
			s = s + 'c'
		elif x[i] == 'b':
			s = s + 'v'
		elif x[i] == 'n':
			s = s + 'b'
		elif x[i] == 'm':
			s = s + 'n'
		elif x[i] == ',':
			s = s + 'm'
		elif x[i] == ']':
			s = s + '['
		elif x[i] == "'":
			s = s + ';'
		elif x[i] == '.':
			s = s + ','
		elif x[i] == '/':
			s = s + '.'
	elif x[i] == 'q':
		s = s + 'w'
	elif x[i] == 'w':
		s = s + 'e'
	elif x[i] == 'e':
		s = s + 'r'
	elif x[i] == 'r':
		s = s + 't'
	elif x[i] == 't':
		s = s + 'y'
	elif x[i] == 'y':
		s = s + 'u'
	elif x[i] == 'u':
		s = s + 'i'
	elif x[i] == 'i':
		s = s + 'o'
	elif x[i] == 'o':
		s = s + 'p'
	elif x[i] == 'a':
		s = s + 's'
	elif x[i] == 's':
		s = s + 'd'
	elif x[i] == 'd':
		s = s + 'f'
	elif x[i] == 'f':
		s = s + 'g'
	elif x[i] == 'g':
		s = s + 'h'
	elif x[i] == 'h':
		s = s + 'j'
	elif x[i] == 'j':
		s = s + 'k'
	elif x[i] == 'k':
		s = s + 'l'
	elif x[i] == 'z':
		s = s + 'x'
	elif x[i] == 'x':
		s = s + 'c'
	elif x[i] == 'l':
		s = s + ';'
	elif x[i] == 'c':
		s = s + 'v'
	elif x[i] == 'v':
		s = s + 'b'
	elif x[i] == 'b':
		s = s + 'n'
	elif x[i] == 'n':
		s = s + 'm'
	elif x[i] == '[':
		s = s + ']'
	elif x[i] == ';':
		s = s + "'"
	elif x[i] == ',':
		s = s + '.'
	elif x[i] == '.':
		s = s + '/'
	elif x[i] == 'm':
		s = s + ','
	i += 1
print(s)


n = input()
inp = input().strip(' ')
s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s2 = ''
if n == 'R':
	for j in range(len(inp)):
		x = s1.index(inp[j])
		s2 += s1[x - 1]
else:
	for j in range(len(inp)):
		x = s1.index(inp[j])
		s2 += s1[x + 1]
print(s2)


d = input()
ch = input()
r1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(ch)):
	if d == 'R':
		print(r1[r1.find(ch[i]) - 1], end='')
	else:
		print(r1[r1.find(ch[i]) + 1], end='')


(h, l) = ([], 'qwertyuiopasdfghjkl;zxcvbnm,./')
(n, k) = (input(), list(input()))
if n == 'R':
	for i in range(0, len(k)):
		t = l.index(k[i])
		h.append(l[t - 1])
else:
	for i in range(0, len(k)):
		t = l.index(k[i])
		h.append(l[t + 1])
print(''.join(h))


__author__ = 'Ekaterina'
move = input()
sentence = list(input())
line1 = list('qwertyuiop')
line2 = list('asdfghjkl;')
line3 = list('zxcvbnm,./')

def toright(a, b):
	if a in b:
		print(b[b.index(a) + 1], end='')

def toleft(a, b):
	if a in b:
		print(b[b.index(a) - 1], end='')
if move == 'L':
	for x in sentence:
		toright(x, line1)
		toright(x, line2)
		toright(x, line3)
elif move == 'R':
	for x in sentence:
		toleft(x, line1)
		toleft(x, line2)
		toleft(x, line3)


direction = input()
s = input()
result = ''
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(s)):
	if direction == 'R':
		result += keyboard[keyboard.index(s[i]) - 1]
	else:
		result += keyboard[keyboard.index(s[i]) + 1]
print(result)


c = input()
s = input()
first = list('qwertyuiop')
second = list('asdfghjkl;')
third = list('zxcvbnm,./')
ans = ''
if c == 'R':
	for i in s:
		if i in first:
			ans += first[first.index(i, 0) - 1]
		elif i in second:
			ans += second[second.index(i, 0) - 1]
		else:
			ans += third[third.index(i, 0) - 1]
else:
	for i in s:
		if i in first:
			ans += first[first.index(i, 0) + 1]
		elif i in second:
			ans += second[second.index(i, 0) + 1]
		else:
			ans += third[third.index(i, 0) + 1]
print(ans)


s = input()
n = input()
n = list(n)
k = 'qwertyuiopasdfghjkl;zxcvbnm,.//'
if s == 'R':
	for i in range(len(n)):
		for j in range(len(k)):
			if n[i] == k[j]:
				n[i] = k[j - 1]
else:
	for i in range(len(n)):
		for j in range(len(k)):
			if n[i] == k[j]:
				n[i] = k[j + 1]
				break
ans = ''
for i in n:
	ans += i
print(ans)


d = {'R': dict(zip('wertyuiopsdfghjkl;xcvbnm,./', 'qwertyuioasdfghjklzxcvbnm,.')), 'L': dict(zip('qwertyuioasdfghjklzxcvbnm,.', 'wertyuiopsdfghjkl;xcvbnm,./'))}
key = input()
line = input()
out = ''
for c in line:
	out += d[key][c]
print(out)


__author__ = 'Alex'
(a, b) = (input().strip(), input().strip())
keyb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in b:
	print(keyb[keyb.index(i) - 1] if a == 'R' else keyb[keyb.index(i) + 1], end='')


direction = input()
s = input()
keyboard = dict()
altKeyboard = dict()
keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
message = []
j = 1
for i in range(len(keys)):
	keyboard[keys[i]] = j
	altKeyboard[j] = keys[i]
	j += 1
if direction == 'R':
	for i in s:
		message.append(altKeyboard[keyboard[i] - 1])
else:
	for i in s:
		message.append(altKeyboard[keyboard[i] + 1])
print(''.join(message))


import string
first = 'qwertyuiop'
second = 'asdfghjkl;'
third = 'zxcvbnm,./'
lr = input()
message = input()
result = ''
switch = 1
if lr == 'R':
	switch = -1
for x in message:
	if x in first:
		result += first[first.index(x) + switch]
	elif x in second:
		result += second[second.index(x) + switch]
	else:
		result += third[third.index(x) + switch]
print(result)


n = input()
s = str(input())
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = []
if n == 'R' or (n == 'r' and len(s) <= 100):
	for i in range(len(s)):
		for j in range(len(k)):
			if s[i] == k[j]:
				l.append(k[j - 1])
				rs = ''.join(l)
elif n == 'L' or (n == 'l' and len(s) <= 100):
	for i in range(len(s)):
		for j in range(len(k) - 1):
			if s[i] == k[j]:
				l.append(k[j + 1])
				rs = ''.join(l)
print(rs)


p = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
h = input()
d = ''
if n == 'R':
	c = -1
else:
	c = +1
for i in range(0, len(h)):
	o = 0
	o = p.find(h[i])
	d = d + p[o + c]
print(d)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
i = input()
s1 = input()
if i == 'R':
	d = -1
else:
	d = 1
s2 = ''
for c in s1:
	s2 = s2 + s[s.find(c) + d]
print(s2)


d = input()
s = input()
l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
s1 = ''
if d == 'R':
	for i in range(len(s)):
		if s[i] in l1:
			s1 += l1[l1.index(s[i]) - 1]
		elif s[i] in l2:
			s1 += l2[l2.index(s[i]) - 1]
		else:
			s1 += l3[l3.index(s[i]) - 1]
else:
	for i in range(len(s)):
		if s[i] in l1:
			s1 += l1[l1.index(s[i]) + 1]
		elif s[i] in l2:
			s1 += l2[l2.index(s[i]) + 1]
		else:
			s1 += l3[l3.index(s[i]) + 1]
print(s1)


direction = str(input())
l1 = str(input())
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
d = {}
if direction == 'R':
	for i in range(len(s1) - 1):
		d[s1[i + 1]] = s1[i]
	for i in range(len(s2) - 1):
		d[s2[i + 1]] = s2[i]
	for i in range(len(s3) - 1):
		d[s3[i + 1]] = s3[i]
else:
	for i in range(len(s1) - 1):
		d[s1[i]] = s1[i + 1]
	for i in range(len(s2) - 1):
		d[s2[i]] = s2[i + 1]
	for i in range(len(s3) - 1):
		d[s3[i]] = s3[i + 1]
for s in l1:
	print(d[s], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
st = input()
r = ''
if c == 'R':
	for x in st:
		r += str(s[s.index(x) - 1])
else:
	for x in st:
		r += str(s[s.index(x) + 1])
print(r)


import sys
f = sys.stdin
chars = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = 1 if f.readline().rstrip() == 'L' else -1
text = f.readline().rstrip()
gold = ''
for c in text:
	p = chars.find(c)
	gold += chars[p + shift]
print(gold)


s = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
n = input()
s1 = input()
for i in range(len(s1)):
	v = s.find(s1[i])
	if n == 'R':
		print(s[v - 1], end='')
	else:
		print(s[v + 1], end='')


m1 = 'qwertyuiop'
m2 = 'asdfghjkl;'
m3 = 'zxcvbnm,./'
ch = input()
s = input()
for i in range(len(s)):
	if ch == 'R' and s[i] in m1:
		s = s[:i] + m1[m1.find(s[i]) - 1] + s[i + 1:]
	elif ch == 'R' and s[i] in m2:
		s = s[:i] + m2[m2.find(s[i]) - 1] + s[i + 1:]
	elif ch == 'R' and s[i] in m3:
		s = s[:i] + m3[m3.find(s[i]) - 1] + s[i + 1:]
	elif ch == 'L' and s[i] in m1:
		s = s[:i] + m1[m1.find(s[i]) + 1] + s[i + 1:]
	elif ch == 'L' and s[i] in m2:
		s = s[:i] + m2[m2.find(s[i]) + 1] + s[i + 1:]
	elif ch == 'L' and s[i] in m3:
		s = s[:i] + m3[m3.find(s[i]) + 1] + s[i + 1:]
print(s)


x = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
y = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
z = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
s = str(input())
l = list(input())
for i in range(len(l)):
	for j in range(len(x)):
		if s == 'R' and l[i] == x[j]:
			l[i] = x[j - 1]
			break
	for j in range(len(y)):
		if s == 'R' and l[i] == y[j]:
			l[i] = y[j - 1]
			break
	for j in range(len(z)):
		if s == 'R' and l[i] == z[j]:
			l[i] = z[j - 1]
			break
	for j in range(len(y) - 1):
		if s == 'L' and l[i] == x[j]:
			l[i] = x[j + 1]
			break
	for j in range(len(y) - 1):
		if s == 'L' and l[i] == y[j]:
			l[i] = y[j + 1]
			break
	for j in range(len(y) - 1):
		if s == 'L' and l[i] == z[j]:
			l[i] = z[j + 1]
			break
print(*l, sep='')


l1 = 'qwertyuiop[]'
l2 = "asdfghjkl;'"
l3 = 'zxcvbnm,./'
side = input()
s = input()
ans = ''
if side == 'R':
	shift = -1
else:
	shift = 1
for i in range(len(s)):
	if l1.find(s[i]) != -1:
		ans += l1[l1.index(s[i]) + shift]
	elif l2.find(s[i]) != -1:
		ans += l2[l2.index(s[i]) + shift]
	elif l3.find(s[i]) != -1:
		ans += l3[l3.index(s[i]) + shift]
print(ans)


D = input()
s = input()
k1 = 'qwertyuiop'
k2 = 'asdfghjkl;'
k3 = 'zxcvbnm,./'
d1 = {}
d2 = {}
d3 = {}
if D == 'L':
	for i in range(9):
		d1.update({k1[i]: k1[i + 1]})
		d2.update({k2[i]: k2[i + 1]})
		d3.update({k3[i]: k3[i + 1]})
	for i in s:
		if i in k1:
			print(d1[i], end='')
		elif i in k2:
			print(d2[i], end='')
		elif i in k3:
			print(d3[i], end='')
if D == 'R':
	for i in range(1, 10):
		d1.update({k1[i]: k1[i - 1]})
		d2.update({k2[i]: k2[i - 1]})
		d3.update({k3[i]: k3[i - 1]})
	for i in s:
		if i in k1:
			print(d1[i], end='')
		elif i in k2:
			print(d2[i], end='')
		elif i in k3:
			print(d3[i], end='')


side = input()
if side == 'R':
	s = -1
else:
	s = 1
inp = input()
first = 'qwertyuiop'
second = 'asdfghjkl;'
third = 'zxcvbnm,./'
for i in inp:
	if i in first:
		print(first[first.index(i) + s], end='')
	elif i in second:
		print(second[second.index(i) + s], end='')
	elif i in third:
		print(third[third.index(i) + s], end='')


import sys

def topo():
	teclado = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	movimiento = sys.stdin.readline().strip()
	conca = ''
	cadena = sys.stdin.readline().strip()
	for i in range(len(cadena)):
		for j in range(len(teclado)):
			if cadena[i] == teclado[j]:
				if movimiento == 'R':
					conca += teclado[j - 1]
				elif movimiento == 'L':
					conca += teclado[j + 1]
	print(conca)
topo()


keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']

def original(string, direction_var):
	new = ''
	for letter in string:
		if direction_var == 'R':
			new += keyboard[keyboard.index(letter) - 1]
		else:
			new += keyboard[keyboard.index(letter) + 1]
	return new
direction = input()
text = input()
print(original(text, direction))


shift = input()
text = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if shift == 'R':
	for i in text:
		print(keyboard[keyboard.find(i) - 1], end='')
else:
	for i in text:
		print(keyboard[keyboard.find(i) + 1], end='')


keyboard = list('qwertyuiopasdfghjkl;zxcvbnm,./')
c = input()
d = 0
if c == 'R':
	d = -1
else:
	d = 1
s = input()
ans = ''
for x in s:
	ans = ans + keyboard[keyboard.index(x) + d]
print(ans)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
d = input()
x = list(input())
c_out = ''
if d == 'R':
	i = 0
	while i < len(x):
		if x[i] in s1:
			s = s1
		elif x[i] in s2:
			s = s2
		else:
			s = s3
		c_out += s[s.index(x[i]) - 1]
		i += 1
else:
	i = 0
	while i < len(x):
		if x[i] in s1:
			s = s1
		elif x[i] in s2:
			s = s2
		else:
			s = s3
		c_out += s[s.index(x[i]) + 1]
		i += 1
print(c_out)


move = input()
ip = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
Rmove = {}
for i in range(29):
	Rmove[keyboard[i]] = keyboard[i + 1]
Lmove = {}
for i in range(1, 30):
	Lmove[keyboard[i]] = keyboard[i - 1]
op = ''
if move == 'R':
	for i in ip:
		op += Lmove[i]
else:
	for i in ip:
		op += Rmove[i]
print(op)


ch = input()
s = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if ch == 'R':
	a = -1
else:
	a = 1
f = ''
for i in s:
	f = f + k[k.index(i) + a]
print(f)


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt
import unittest

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input().strip()
text = input().strip()
print(''.join((kb[kb.index(c) + (-1 if shift == 'R' else 1)] for c in text)))


a = input()
n = input()
r = list(n)
m1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
m2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
m3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
for i in range(len(r)):
	if 'L' in a:
		if r[i] in m1:
			index = min(m1.index(r[i]) + 1, len(m1))
			r.pop(i)
			r.insert(i, m1[index])
		if r[i] in m2:
			index = m2.index(r[i]) + 1
			r.pop(i)
			r.insert(i, m2[index])
		if r[i] in m3:
			index = m3.index(r[i]) + 1
			r.pop(i)
			r.insert(i, m3[index])
	if 'R' in a:
		if r[i] in m1:
			index = max(m1.index(r[i]) - 1, 0)
			r.pop(i)
			r.insert(i, m1[index])
		if r[i] in m2:
			index = max(m2.index(r[i]) - 1, 0)
			r.pop(i)
			r.insert(i, m2[index])
		if r[i] in m3:
			index = max(m3.index(r[i]) - 1, 0)
			r.pop(i)
			r.insert(i, m3[index])
r = ''.join(map(str, r))
print(r)


keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
dest = input()
line = input()
incr = 0
if dest == 'R':
	incr = -1
else:
	incr = 1
ans = ''
for c in line:
	for keys in keyboard:
		if c in keys:
			ans += keys[keys.index(c) + incr]
print(ans)


def main():
	lines = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
	(left, right) = ({}, {})
	for line in lines:
		n = len(line)
		left[line[n - 1]] = line[n - 2]
		right[line[0]] = line[1]
		for i in range(1, n - 1):
			left[line[i]] = line[i - 1]
			right[line[i]] = line[i + 1]
	shift = input()
	message = ''.join([right[c] for c in input()]) if shift == 'L' else ''.join([left[c] for c in input()])
	print(message)
main()


b = str(input())
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
st = str(input())
v = []
for i in range(len(st)):
	if st[i] in s1:
		if b == 'R':
			v.append(s1[s1.find(st[i]) - 1])
		else:
			v.append(s1[s1.find(st[i]) + 1])
	elif st[i] in s2:
		if b == 'R':
			v.append(s2[s2.find(st[i]) - 1])
		else:
			v.append(s2[s2.find(st[i]) + 1])
	elif b == 'R':
		v.append(s3[s3.find(st[i]) - 1])
	else:
		v.append(s3[s3.find(st[i]) + 1])
print(''.join(v))


from collections import Counter
import string
import math
import sys

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(number_of_variables):
	if number_of_variables == 1:
		return int(sys.stdin.readline())
	if number_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
mod = 100000007
tt = input()
num = input()
a = 'qwertyuiop' + 'asdfghjkl;' + 'zxcvbnm,./'
a = list(a)
ans = ''
if tt == 'R':
	for i in range(len(num)):
		ans += a[a.index(num[i]) - 1]
if tt == 'L':
	for i in range(len(num)):
		ans += a[a.index(num[i]) + 1]
print(ans)


s = input()
if s == 'R':
	factor = -1
elif s == 'L':
	factor = 1
top = 'qwertyuiop'
mid = 'asdfghjkl;'
bot = 'zxcvbnm,./'
main = input()
for i in range(len(main)):
	for j in range(len(top)):
		id_x = j + factor
		if j + factor == len(top) and s == 'R':
			id_x = j + factor - 1
		elif j + factor == len(top) and s == 'L':
			id_x = j + factor + 1
		if main[i] == top[j]:
			print(top[id_x], end='')
		elif main[i] == mid[j]:
			print(mid[id_x], end='')
		elif main[i] == bot[j]:
			print(bot[id_x], end='')


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
s1 = list(s1)
s2 = list(s2)
s3 = list(s3)
ch = input()
s = input()
s = list(s)
if ch == 'L':
	for i in range(0, len(s)):
		for j in range(9, -1, -1):
			if s[i] == s1[j]:
				s[i] = s1[j + 1]
			elif s[i] == s2[j]:
				s[i] = s2[j + 1]
			elif s[i] == s3[j]:
				s[i] = s3[j + 1]
elif ch == 'R':
	for i in range(0, len(s)):
		for j in range(0, 10):
			if s[i] == s1[j]:
				s[i] = s1[j - 1]
			elif s[i] == s2[j]:
				s[i] = s2[j - 1]
			elif s[i] == s3[j]:
				s[i] = s3[j - 1]
print(''.join(s))


strings = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
mode = input()
s = input()
if mode == 'R':
	mode = -1
else:
	mode = 1
for i in s:
	for lev in strings:
		if i in lev:
			ind = (lev.index(i) + mode) % 10
			print(lev[ind], end='')
			break


direction = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shifted = input()
original = ''
for l in shifted:
	if direction == 'R':
		original += keyboard[keyboard.find(l) - 1]
	else:
		original += keyboard[keyboard.find(l) + 1]
print(original)


kb = '\nqwertyuiopasdfghjkl;zxcvbnm,./'
ind = -1 if input() == 'R' else 1
text = input()
nt = ''
for char in text:
	nt += kb[kb.index(char) + ind]
print(nt)


dir = input()
st = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
if dir == 'R':
	for i in st:
		ind = key.find(i)
		res = res + key[ind - 1]
else:
	for i in st:
		ind = key.find(i)
		res = res + key[ind + 1]
print(res)


kb1 = ('q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p')
kb2 = ('a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';')
kb3 = ('z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/')
ch = input()
s = input()
answ = []
if ch == 'R':
	for i in range(len(s)):
		if s[i] in kb1:
			key = kb1.index(s[i]) - 1
			answ.append(kb1[key])
		elif s[i] in kb2:
			key = kb2.index(s[i]) - 1
			answ.append(kb2[key])
		else:
			key = kb3.index(s[i]) - 1
			answ.append(kb3[key])
else:
	for i in range(len(s)):
		if s[i] in kb1:
			key = kb1.index(s[i]) + 1
			answ.append(kb1[key])
		elif s[i] in kb2:
			key = kb2.index(s[i]) + 1
			answ.append(kb2[key])
		else:
			key = kb3.index(s[i]) + 1
			answ.append(kb3[key])
print(''.join(answ))


letters = list('qwertyuiopasdfghjkl;zxcvbnm,./')
output = ''
i = 1 if input() == 'L' else -1
for c in input():
	output += letters[letters.index(c) + i]
print(output)


verh = 'qwertyuiop'
centr = 'asdfghjkl;'
niz = 'zxcvbnm,./'
n = input()
a = input()
nomervstroke = 0
if n == 'R':
	for i in range(len(a)):
		if a[i] in verh:
			nomervstroke = verh.find(a[i]) - 1
			print(verh[nomervstroke], end='')
		elif a[i] in centr:
			nomervstroke = centr.find(a[i]) - 1
			print(centr[nomervstroke], end='')
		else:
			nomervstroke = niz.find(a[i]) - 1
			print(niz[nomervstroke], end='')
else:
	for i in range(len(a)):
		if a[i] in verh:
			nomervstroke = verh.find(a[i]) + 1
			print(verh[nomervstroke], end='')
		elif a[i] in centr:
			nomervstroke = centr.find(a[i]) + 1
			print(centr[nomervstroke], end='')
		else:
			nomervstroke = niz.find(a[i]) + 1
			print(niz[nomervstroke], end='')


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
a = input()
s = input()
t = ''
if a == 'L':
	for i in range(len(s)):
		if s[i] in s1:
			t += s1[s1.index(s[i]) + 1]
		elif s[i] in s2:
			t += s2[s2.index(s[i]) + 1]
		else:
			t += s3[s3.index(s[i]) + 1]
else:
	for i in range(len(s)):
		if s[i] in s1:
			t += s1[s1.index(s[i]) - 1]
		elif s[i] in s2:
			t += s2[s2.index(s[i]) - 1]
		else:
			t += s3[s3.index(s[i]) - 1]
print(t)


mode = input()
message = input()
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
if mode == 'R':
	char = dict()
	for i in range(3):
		for j in range(1, len(keyboard[i])):
			char[keyboard[i][j]] = keyboard[i][j - 1]
	for i in range(len(message)):
		print(char[message[i]], end='')
else:
	char = dict()
	for i in range(3):
		for j in range(len(keyboard[i]) - 1):
			char[keyboard[i][j]] = keyboard[i][j + 1]
	for i in range(len(message)):
		print(char[message[i]], end='')


a = input()
s = input()
z = ''
k1 = '""qwertyuiop""'
k2 = '""asdfghjkl;""'
k3 = '""zxcvbnm,./""'
for i in s:
	if a == 'R':
		if i in k1:
			z += k1[k1.find(i) - 1]
		elif i in k2:
			z += k2[k2.find(i) - 1]
		elif i in k3:
			z += k3[k3.find(i) - 1]
	elif a == 'L':
		if i in k1:
			z += k1[k1.find(i) + 1]
		elif i in k2:
			z += k2[k2.find(i) + 1]
		elif i in k3:
			z += k3[k3.find(i) + 1]
print(z)


def coder(l, s):
	s1 = ''
	l1 = list('qwertyuiopasdfghjkl;zxcvbnm,./')
	if s == 'L':
		j = 1
	else:
		j = -1
	for i in l:
		a = l1.index(i)
		s1 += l1[a + j]
	return s1
s = input()
l = input()
print(coder(l, s))


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = len(s)
d = {}
for i in range(0, n):
	x = y = s[i]
	if i < n - 1:
		x = s[i + 1]
	if i > 0:
		y = s[i - 1]
	d[s[i]] = (x, y)
shift = input()
s = input()
ans = ''
if shift == 'L':
	for i in s:
		ans += d[i][0]
else:
	for i in s:
		ans += d[i][1]
print(ans)


p = 'qwertyuiop'
q = 'asdfghjkl;'
r = 'zxcvbnm,./'
d = input()
s = input()
ans = ''
if d == 'R':
	off = -1
else:
	off = 1
for i in s:
	if i in p:
		ans += p[p.index(i) + off]
	elif i in q:
		ans += q[q.index(i) + off]
	else:
		ans += r[r.index(i) + off]
print(ans)


c = input()
s = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,.//'
if c == 'R':
	for i in s:
		print(key[key.find(i) - 1], end='')
else:
	for i in s:
		print(key[key.find(i) + 1], end='')
print()


n = input()
l = list(input())
l1 = list('qwertyuiopasdfghjkl;zxcvbnm,./')
l2 = []
if n == 'L':
	for i in l:
		ind = l1.index(i)
		l2.append(l1[ind + 1])
else:
	for i in l:
		ind = l1.index(i)
		l2.append(l1[ind - 1])
print(''.join(l2))


d = input()
s = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
true_message = ''
n = len(s)
if d == 'R':
	k = -1
else:
	k = 1
for i in range(n):
	letter = keyboard[keyboard.index(s[i]) + k]
	true_message += letter
print(true_message)


board = 'qwertyuiopasdfghjkl;zxcvbnm,./'
cache = dict(zip(board, range(len(board))))
d = 1 if input() == 'L' else -1
S = input().strip()
print(''.join(list(map(lambda char: board[cache[char] + d], S))))


if input() == 'R':
	side = -1
else:
	side = 1
mas1 = list('qwertyuiop')
mas2 = list('asdfghjkl;')
mas3 = list('zxcvbnm,./')
for i in list(input()):
	if i in mas1:
		print(mas1[mas1.index(i) + side], end='')
	elif i in mas2:
		print(mas2[mas2.index(i) + side], end='')
	elif i in mas3:
		print(mas3[mas3.index(i) + side], end='')


__author__ = 'runekri3'
KEYBOARD = 'qwertyuiopasdfghjkl;zxcvbnm,./'
out_data = ''
add_index = 1 if input() == 'L' else -1
inp_data = input()
for letter in inp_data:
	out_data += KEYBOARD[KEYBOARD.index(letter) + add_index]
print(out_data)


shift = 1 if input() == 'L' else -1
s = input()
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
new_s = ''
for c in s:
	for row in keyboard:
		if c in row:
			new_s += row[row.index(c) + shift]
			break
print(new_s)


direction = input()
message = [str(x) for x in input()]
origin = []
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
if direction == 'R':
	for i in message:
		for j in keyboard:
			if j.find(i) != -1:
				origin.append(j[j.find(i) - 1])
else:
	for i in message:
		for j in keyboard:
			if j.find(i) != -1:
				origin.append(j[j.find(i) + 1])
print(''.join(origin))


from math import ceil

def main():
	s = list('qwertyuiopasdfghjkl;zxcvbnm,./')
	side = input()
	if side == 'R':
		adjust = -1
	else:
		adjust = 1
	str = input()
	ans = ''
	for ch in str:
		num = s.index(ch)
		ans += s[num + adjust]
	print(ans)
main()


l1 = list('qwertyuiop')
l2 = list('asdfghjkl;')
l3 = list('zxcvbnm,./')
c = input()
s = list(input())
for i in s:
	if c == 'R':
		if i in l1:
			print(l1[l1.index(i) - 1], end='')
		if i in l2:
			print(l2[l2.index(i) - 1], end='')
		if i in l3:
			print(l3[l3.index(i) - 1], end='')
	if c == 'L':
		if i in l1:
			print(l1[l1.index(i) + 1], end='')
		if i in l2:
			print(l2[l2.index(i) + 1], end='')
		if i in l3:
			print(l3[l3.index(i) + 1], end='')


a = list('qwertyuiop')
b = list('asdfghjkl;')
c = list('zxcvbnm,./')
d = a + b + c

def t(x, y):
	l = len(y)
	r = y
	if x == 'R':
		for i in range(l):
			r[i] = d[d.index(y[i]) - 1]
	elif x == 'L':
		for i in range(l):
			r[i] = d[d.index(y[i]) + 1]
	return r
x = str(input())
y = list(input())
print(''.join(t(x, y)))


s = input()
e = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
for i in range(len(e)):
	if e[i] in a and s == 'R':
		print(a[a.index(e[i]) - 1], end='')
	elif e[i] in a and s == 'L':
		print(a[a.index(e[i]) + 1], end='')
	elif e[i] in b and s == 'R':
		print(b[b.index(e[i]) - 1], end='')
	elif e[i] in b and s == 'L':
		print(b[b.index(e[i]) + 1], end='')
	elif e[i] in c and s == 'R':
		print(c[c.index(e[i]) - 1], end='')
	elif e[i] in c and s == 'L':
		print(c[c.index(e[i]) + 1], end='')


a = 'qwertyuiop\n      asdfghjkl;\n      zxcvbnm,./'
y = list(a)
m = input()
c = list(input())
d = []
if m == 'R':
	for j in c:
		for i in range(1, len(a)):
			if j == a[i]:
				d.append(a[i - 1])
elif m == 'L':
	for j in c:
		for i in range(0, len(a)):
			if j == a[i]:
				d.append(a[i + 1])
for i in d:
	print(i, end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
x = input()
x = list(x)
ans = []
if d == 'R':
	for i in x:
		ans.append(s[s.index(i) - 1])
else:
	for i in x:
		ans.append(s[s.index(i) + 1])
print(''.join(ans))


q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
w = input()
a = input()
t = ''
if w == 'R':
	for i in a:
		t = t + q[q.index(i) - 1]
else:
	for i in a:
		t = t + q[q.index(i) + 1]
print(t)


a = input()
offs = {'L': 1, 'R': -1}[a]
x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = input()
for i in b:
	print(x[x.index(i) + offs], end='')


def getCorrectLetter(_curLetter, _shiftDir):
	fullKB = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	pos = fullKB.find(_curLetter) + _shiftDir
	return fullKB[pos]
shiftDirection = str(input()).lower()
strInput = str(input()).lower()
shiftDirInt = 0
if shiftDirection == 'r':
	shiftDirInt = -1
else:
	shiftDirInt = 1
for l in strInput:
	print(getCorrectLetter(l, shiftDirInt), end='')


a = input()
s = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'L':
	for i in s:
		x = k.index(i)
		print(k[x + 1], end='')
else:
	for i in s:
		x = k.index(i)
		print(k[x - 1], end='')


direct = input()
s = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if direct == 'L':
	for i in s:
		print(keyboard[keyboard.index(i) + 1], end='')
else:
	for i in s:
		print(keyboard[keyboard.index(i) - 1], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
char_to_int = dict(zip(s, range(len(s))))
int_to_char = dict(zip(range(len(s)), s))
e = -1 if input() == 'R' else 1
t = input()
ints = [char_to_int[c] for c in t]
org = [int_to_char[i + e] for i in ints]
print(''.join(org))


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = list(c)
s = ''
e = 0
d = 0
if a == 'R':
	for i in range(len(b)):
		d = b[i]
		e = c.index(d)
		s += c[e - 1]
elif a == 'L':
	for i in range(len(b)):
		d = b[i]
		e = c.index(d)
		s += c[e + 1]
print(s)


t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = {}
r = {}
for i in range(len(t) - 1):
	l[t[i + 1]] = t[i]
	r[t[i]] = t[i + 1]
d = {}
u = input()
if u == 'R':
	d = l
else:
	d = r
ans = ''
for c in input():
	ans = ans + d[c]
print(ans)


shift = input()
string = input()
ans = ''
big = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(string)):
	char = string[i]
	if shift == 'R':
		for j in range(len(big)):
			if big[j] == char:
				if j != 0:
					ans += big[j - 1]
				else:
					ans += '/'
	else:
		for j in range(len(big)):
			if big[j] == char:
				if j != 29:
					ans += big[j + 1]
				else:
					ans += 'q'
print(ans)


st = 'qwertyuiop'
nd = 'asdfghjkl;'
d = 'zxcvbnm,./'
letter = input()
text = input()
result = list()
for i in range(len(text)):
	if text[i] in st:
		if letter == 'R':
			result.append(st[st.find(text[i]) - 1])
		else:
			result.append(st[st.find(text[i]) + 1])
	elif text[i] in nd:
		if letter == 'R':
			result.append(nd[nd.find(text[i]) - 1])
		else:
			result.append(nd[nd.find(text[i]) + 1])
	elif letter == 'R':
		result.append(d[d.find(text[i]) - 1])
	else:
		result.append(d[d.find(text[i]) + 1])
print(''.join(result))


n = input()
s = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = []
for i in s:
	if n == 'R':
		b.append(a[a.index(i) - 1])
	else:
		b.append(a[a.index(i) + 1])
print(''.join([str(elem) for elem in b]))


layout = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
string = input()
shift = (ord('L') + ord('R')) / 2 - ord(direction)
shift = int(shift / abs(shift))
ans = [layout[layout.find(char) + shift] for char in string]
print(''.join(ans))


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = input()
c = input()
d = ''
for k in range(len(c)):
	f = a.index(c[k])
	if b == 'R':
		d += a[f - 1]
	else:
		d += a[f + 1]
print(d)


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b1 = len(b)
b2 = ''
if a == 'R':
	for i in range(b1):
		c1 = c.index(b[i]) - 1
		b2 += c[c1]
elif a == 'L':
	for i in range(b1):
		c1 = c.index(b[i]) + 1
		if c1 == 30:
			c1 = 0
		b2 += c[c1]
print(b2)


kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
vecotor = input().lower()
text = input().lower()
result = ''
if vecotor == 'r':
	delta = -1
else:
	delta = 1
for char in text:
	result += kb[kb.rfind(char) + delta]
print(result, end='')


A = list('qwertyuiop') + list('asdfghjkl;') + list('zxcvbnm,./')
k = input()
s = input()
B = []
if k == 'R':
	for i in s:
		B.append(A[A.index(i) - 1])
else:
	for i in s:
		B.append(A[A.index(i) + 1])
print(''.join(B))


def listToString(s):
	str1 = ''
	for ele in s:
		str1 = str(str1) + str(ele)
	return str1
firstRow = list('qwertyuiop')
secondRow = list('asdfghjkl;')
thirdRow = list('zxcvbnm,./')
offset = input('')
wordsRefined = list()
if offset == 'R':
	words = list(input(''))
	for word in range(len(words)):
		letter = words[word]
		if letter in firstRow:
			letterIndex = firstRow.index(letter)
			wordsRefined.append(firstRow[letterIndex - 1])
		if letter in secondRow:
			letterIndex = secondRow.index(letter)
			wordsRefined.append(secondRow[letterIndex - 1])
		if letter in thirdRow:
			letterIndex = thirdRow.index(letter)
			wordsRefined.append(thirdRow[letterIndex - 1])
if offset == 'L':
	words = list(input(''))
	for word in range(len(words)):
		letter = words[word]
		if letter in firstRow:
			letterIndex = firstRow.index(letter)
			wordsRefined.append(firstRow[letterIndex + 1])
		if letter in secondRow:
			letterIndex = secondRow.index(letter)
			wordsRefined.append(secondRow[letterIndex + 1])
		if letter in thirdRow:
			letterIndex = thirdRow.index(letter)
			wordsRefined.append(thirdRow[letterIndex + 1])
wordsRefined = listToString(wordsRefined)
print(wordsRefined)


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = input()
msg = input()
if s == 'L':
	print(''.join([k[k.find(i) + 1] for i in msg]))
else:
	print(''.join([k[k.find(i) - 1] for i in msg]))


Lado = input('')
SMSo = input('')
Fila = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
SMSf = ''
if Lado == 'R':
	for Letra in SMSo:
		for K in range(30):
			if Fila[K] == Letra:
				SMSf = SMSf + Fila[K - 1]
				break
	print(SMSf)
else:
	for Letra in SMSo:
		for K in range(30):
			if Fila[K] == Letra:
				SMSf = SMSf + Fila[K + 1]
				break
	print(SMSf)


s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
s = input()
ans = []
if d == 'R':
	for i in s:
		ans.append(s1[s1.index(i) - 1])
else:
	for i in s:
		ans.append(s1[s1.index(i) + 1])
print(*ans, sep='')


a = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
r = [' qwertyuiop', ' asdfghjkl;', ' zxcvbnm,./']
l = ['wertyuiop', 'sdfghjkl;', 'xcvbnm,./']
s = input().strip()
str = input().strip()
ans = []
if s == 'L':
	for i in str:
		for j in range(3):
			if i in a[j]:
				ans.append(l[j][a[j].find(i)])
				break
else:
	for i in str:
		for j in range(3):
			if i in a[j]:
				ans.append(r[j][a[j].find(i)])
				break
print(''.join(ans))


keyboard = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
detail = {}
for x in keyboard.split('\n'):
	for string in x:
		try:
			index = x.index(string)
			try:
				left = x[index - 1]
			except:
				left = None
			try:
				right = x[index + 1]
			except:
				right = None
			detail[string] = {'left': left, 'right': right}
		except IndexError:
			pass
a = input()
b = input()
if a == 'R':
	print(''.join([detail[data]['left'] for data in b]))
else:
	print(''.join([detail[data]['right'] for data in b]))


(c, s) = (input(), input())
(s1, s2, s3, os) = ('qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./', '')
if c == 'R':
	for e in s:
		if e in s1:
			if s1.index(e) == 0:
				os += s1[0]
			else:
				os += s1[s1.index(e) - 1]
		elif e in s2:
			if s2.index(e) == 0:
				os += s2[0]
			else:
				os += s2[s2.index(e) - 1]
		elif e in s3:
			if s3.index(e) == 0:
				os += s3[0]
			else:
				os += s3[s3.index(e) - 1]
if c == 'L':
	for e in s:
		if e in s1:
			if s1.index(e) == len(s1) - 1:
				os += s1[len(s1) - 1]
			else:
				os += s1[s1.index(e) + 1]
		elif e in s2:
			if s2.index(e) == len(s2) - 1:
				os += s2[len(s2) - 1]
			else:
				os += s2[s2.index(e) + 1]
		elif e in s3:
			if s3.index(e) == len(s3) - 1:
				os += s3[len(s3) - 1]
			else:
				os += s3[s3.index(e) + 1]
print(os)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
keylist = list(s)
direction = input()
given = input()
st = ''
for i in given:
	j = keylist.index(i)
	if direction == 'R':
		st = st + keylist[j - 1]
	else:
		st = st + keylist[j + 1]
print(st)


d = input()
se = input()
s = ''
keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	c = -1
else:
	c = 1
for i in range(len(se)):
	p = keys.find(se[i])
	s += keys[p + c]
print(s)


dir = input()
if dir == 'R':
	dir = -1
else:
	dir = 1
list = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
read = input()
res = ''
for char in read:
	pos = -1
	for i in range(len(list)):
		if char in list[i]:
			pos = i
	idx = list[pos].find(char)
	res += list[pos][idx + dir]
print(res)


m = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
n = input()
l = list(input())
if n == 'R':
	for (v, i) in enumerate(l):
		if i in m[0]:
			for j in range(1, len(m[0])):
				if i == m[0][j]:
					l.pop(v)
					l.insert(v, m[0][j - 1])
		if i in m[1]:
			for j in range(1, len(m[1])):
				if i == m[1][j]:
					l.pop(v)
					l.insert(v, m[1][j - 1])
		if i in m[2]:
			for j in range(1, len(m[2])):
				if i == m[2][j]:
					l.pop(v)
					l.insert(v, m[2][j - 1])
else:
	for (v, i) in enumerate(l):
		if i in m[0]:
			for j in range(len(m[0]) - 1):
				if i == m[0][j]:
					l.pop(v)
					l.insert(v, m[0][j + 1])
		if i in m[1]:
			for j in range(len(m[1]) - 1):
				if i == m[1][j]:
					l.pop(v)
					l.insert(v, m[1][j + 1])
		if i in m[2]:
			for j in range(len(m[2]) - 1):
				if i == m[2][j]:
					l.pop(v)
					l.insert(v, m[2][j + 1])
print(''.join(l))


l = list('qwertyuiopasdfghjkl;zxcvbnm,./')
sh = input()
s = input()
print(''.join((l[(l.index(ch) + (1 if sh == 'L' else -1)) % len(l)] for ch in s)))


str = 'qwertyuiopasdfghjkl;zxcvbnm,./'
Type = input()
if Type == 'R':
	print(*[str[str.index(i) - 1] for i in input()], sep='')
else:
	print(*[str[str.index(i) + 1] for i in input()], sep='')


direction = input()
sequence = input()
characters = [i for i in 'qwertyuiopasdfghjkl;zxcvbnm,./']
output = ''
increment = -1
if direction == 'L':
	increment = 1
for i in sequence:
	output += characters[characters.index(i) + increment]
print(output)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
i = input
d = 1 - (i() > 'L') * 2
for c in i():
	print(a[a.find(c) + d], end='')


a = list('qwertyuiopasdfghjkl;zxcvbnm,./')
d = dict()
for i in range(len(a)):
	d[a[i]] = i
l = input()
if l == 'L':
	o = 1
else:
	o = -1
a2 = list(input())
for i in range(len(a2)):
	print(a[d[a2[i]] + o], end='')
print()


import sys
key = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
mpR = {}
mpL = {}
for line in key:
	for (i, c) in enumerate(line):
		if i < len(line) - 1:
			mpR[c] = line[i + 1]
		if i > 0:
			mpL[c] = line[i - 1]
direction = input()
if direction == 'R':
	mp = mpL
else:
	mp = mpR
message = input()
origin = ''
for c in message:
	origin += mp[c]
print(origin)


l = list('qwertyuiop')
l2 = list('asdfghjkl;')
l3 = list('zxcvbnm,./')
zo = l + l2 + l3
new = []
pan = input()
st = list(input())
for i in range(len(st)):
	x = st[i]
	k = zo.index(x)
	if pan == 'R':
		k -= 1
	elif pan == 'L':
		k += 1
	new.append(zo[k])
print(''.join(new))


(s, w) = (input(), input())
k = list('qwertyuiopasdfghjkl;zxcvbnm,./')
out = ''
if s == 'R':
	for i in w:
		out += k[k.index(i) - 1]
else:
	for i in w:
		out += k[k.index(i) + 1]
print(out)


def keyboard(orient, s):
	line = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
	ans = ''
	val = 1 if orient == 'L' else -1
	for i in s:
		for l in line:
			if i in l:
				ind = l.index(i) + val
				if ind <= 0 or ind >= len(l):
					ans += l[ind]
				else:
					ans += l[ind]
				break
	return ans
orient = input()
s = input()
print(keyboard(orient, s))


direction = str(input())
message = str(input())
keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
result = []
for i in range(len(message)):
	for j in range(len(keyboard)):
		if message[i] == keyboard[j]:
			if direction == 'R':
				result.append(keyboard[j - 1])
			else:
				result.append(keyboard[j + 1])
print(''.join(result))


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
side = input()
s = input()
if side == 'L':
	for i in s:
		print(a[a.find(i) + 1], end='')
else:
	for i in s:
		print(a[a.find(i) - 1], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
F = {}
f = input()
if f == 'R':
	for i in range(1, len(s)):
		F[s[i]] = s[i - 1]
else:
	for i in range(len(s) - 1):
		F[s[i]] = s[i + 1]
print(''.join([F[c] for c in input()]))


def split(word):
	return [char for char in word]
pos = input()
word = split(input())
for i in range(0, len(word)):
	if pos == 'L':
		if word[i] == 'q':
			word[i] = 'w'
		elif word[i] == 'w':
			word[i] = 'e'
		elif word[i] == 'e':
			word[i] = 'r'
		elif word[i] == 'r':
			word[i] = 't'
		elif word[i] == 't':
			word[i] = 'y'
		elif word[i] == 'y':
			word[i] = 'u'
		elif word[i] == 'u':
			word[i] = 'i'
		elif word[i] == 'i':
			word[i] = 'o'
		elif word[i] == 'o':
			word[i] = 'p'
		elif word[i] == 'a':
			word[i] = 's'
		elif word[i] == 's':
			word[i] = 'd'
		elif word[i] == 'd':
			word[i] = 'f'
		elif word[i] == 'f':
			word[i] = 'g'
		elif word[i] == 'g':
			word[i] = 'h'
		elif word[i] == 'h':
			word[i] = 'j'
		elif word[i] == 'j':
			word[i] = 'k'
		elif word[i] == 'k':
			word[i] = 'l'
		elif word[i] == 'l':
			word[i] = ';'
		elif word[i] == 'z':
			word[i] = 'x'
		elif word[i] == 'x':
			word[i] = 'c'
		elif word[i] == 'c':
			word[i] = 'v'
		elif word[i] == 'v':
			word[i] = 'b'
		elif word[i] == 'b':
			word[i] = 'n'
		elif word[i] == 'n':
			word[i] = 'm'
		elif word[i] == 'm':
			word[i] = ','
		elif word[i] == ',':
			word[i] = '.'
		elif word[i] == '.':
			word[i] = '/'
	elif word[i] == '[':
		word[i] = 'p'
	elif word[i] == 'p':
		word[i] = 'o'
	elif word[i] == 'o':
		word[i] = 'i'
	elif word[i] == 'i':
		word[i] = 'u'
	elif word[i] == 'u':
		word[i] = 'y'
	elif word[i] == 'y':
		word[i] = 't'
	elif word[i] == 't':
		word[i] = 'r'
	elif word[i] == 'r':
		word[i] = 'e'
	elif word[i] == 'e':
		word[i] = 'w'
	elif word[i] == 'w':
		word[i] = 'q'
	elif word[i] == ';':
		word[i] = 'l'
	elif word[i] == 'l':
		word[i] = 'k'
	elif word[i] == 'k':
		word[i] = 'j'
	elif word[i] == 'j':
		word[i] = 'h'
	elif word[i] == 'h':
		word[i] = 'g'
	elif word[i] == 'g':
		word[i] = 'f'
	elif word[i] == 'f':
		word[i] = 'd'
	elif word[i] == 'd':
		word[i] = 's'
	elif word[i] == 's':
		word[i] = 'a'
	elif word[i] == '/':
		word[i] = '.'
	elif word[i] == '.':
		word[i] = ','
	elif word[i] == ',':
		word[i] = 'm'
	elif word[i] == 'm':
		word[i] = 'n'
	elif word[i] == 'n':
		word[i] = 'b'
	elif word[i] == 'b':
		word[i] = 'v'
	elif word[i] == 'v':
		word[i] = 'c'
	elif word[i] == 'c':
		word[i] = 'x'
	elif word[i] == 'x':
		word[i] = 'z'
print(''.join(word))


r = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = ''
l = str(input())
s = str(input())
if l == 'R':
	for i in range(len(s)):
		n += r[r.find(s[i]) - 1]
else:
	for i in range(len(s)):
		n += r[r.find(s[i]) + 1]
print(n)


s = input().lower()
text = input()
ind = 0
alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if s == 'l':
	for i in range(len(text)):
		ind = alpha.index(text[i]) + 1
		print(alpha[ind], end='')
elif s == 'r':
	for i in range(len(text)):
		ind = alpha.index(text[i]) - 1
		print(alpha[ind], end='')


shift = input()
st = input()
keyboard1 = 'qwertyuiop'
keyboard2 = 'asdfghjkl;'
keyboard3 = 'zxcvbnm,./'
newst = ''
for i in range(0, len(st)):
	if st[i] in keyboard1:
		for k in range(0, len(keyboard1)):
			if st[i] == keyboard1[k]:
				if shift == 'R':
					if k > 0:
						newst += keyboard1[k - 1]
					else:
						newst += keyboard1[k + 1]
				elif k < len(keyboard1):
					newst += keyboard1[k + 1]
				else:
					newst += keyboard1[k - 1]
	elif st[i] in keyboard2:
		for k in range(0, len(keyboard2)):
			if st[i] == keyboard2[k]:
				if shift == 'R':
					if k > 0:
						newst += keyboard2[k - 1]
					else:
						newst += keyboard2[k + 1]
				elif k < len(keyboard1):
					newst += keyboard2[k + 1]
				else:
					newst += keyboard2[k - 1]
	else:
		for k in range(0, len(keyboard3)):
			if st[i] == keyboard3[k]:
				if shift == 'R':
					if k > 0:
						newst += keyboard3[k - 1]
					else:
						newst += keyboard3[k + 1]
				elif k < len(keyboard1):
					newst += keyboard3[k + 1]
				else:
					newst += keyboard3[k - 1]
print(newst)


key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
m = input()
new = []
for i in range(len(m)):
	if d == 'R':
		new.append(key[key.index(m[i]) - 1])
	else:
		new.append(key[key.index(m[i]) + 1])
print(''.join(new))


dir = str(input())
operation_string = str(input())
upper_key = 'qwertyuiop['
middle_key = "asdfghjkl;'"
lower_key = 'zxcvbnm,./'
if dir == 'R':
	for i in operation_string:
		if i in upper_key:
			t = upper_key.index(i)
			print(upper_key[t - 1], end='')
		elif i in middle_key:
			t = middle_key.index(i)
			print(middle_key[t - 1], end='')
		elif i in lower_key:
			t = lower_key.index(i)
			print(lower_key[t - 1], end='')
else:
	for i in operation_string:
		if i in upper_key:
			t = upper_key.index(i)
			print(upper_key[t + 1], end='')
		elif i in middle_key:
			t = middle_key.index(i)
			print(middle_key[t + 1], end='')
		elif i in lower_key:
			t = lower_key.index(i)
			print(lower_key[t + 1], end='')


l = list('qwertyuiopasdfghjkl;zxcvbnm,./')
direction = input()
shaniqua = list(input())
if direction == 'R':
	for i in range(len(shaniqua)):
		shaniqua[i] = l[l.index(shaniqua[i]) - 1]
else:
	for i in range(len(shaniqua)):
		shaniqua[i] = l[l.index(shaniqua[i]) + 1]
print(''.join(shaniqua))


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
m = 1 if input() == 'L' else -1
text = input()
print(''.join([keyboard[keyboard.find(k) + m] for k in text]))


from sys import stdin

def res(di, cad):
	l1 = 'qwertyuiop'
	l2 = 'asdfghjkl;'
	l3 = 'zxcvbnm,./'
	if di == 'R':
		for x in cad:
			if x in l1:
				pos = l1.find(x)
				pal = l1[pos - 1]
				print(pal, end='')
			elif x in l2:
				pos = l2.find(x)
				pal = l2[pos - 1]
				print(pal, end='')
			else:
				pos = l3.find(x)
				pal = l3[pos - 1]
				print(pal, end='')
	else:
		for x in cad:
			if x in l1:
				pos = l1.find(x)
				pal = l1[pos + 1]
				print(pal, end='')
			elif x in l2:
				pos = l2.find(x)
				pal = l2[pos + 1]
				print(pal, end='')
			else:
				pos = l3.find(x)
				pal = l3[pos + 1]
				print(pal, end='')

def main():
	d = stdin.readline().strip().upper()
	c = stdin.readline().strip()
	res(d, c)
main()


li = ['q w e r t y u i o p'.split(), 'a s d f g h j k l ;'.split(), 'z x c v b n m , . /'.split()]
d = dict()
for i in range(0, 3):
	for j in range(0, 10):
		d[li[i][j]] = [i, j]
x = 1
if input() == 'R':
	x = -1
string = input()
for char in string:
	print(li[d[char][0]][d[char][1] + x], end='')


arr = list('qwertyuiopasdfghjkl;zxcvbnm,./')
ch = input()
brr = input()
brr = list(brr)
str = ''
if ch == 'R':
	for i in brr:
		x = arr.index(i)
		str = str + arr[x - 1]
else:
	for i in brr:
		x = arr.index(i)
		str = str + arr[x + 1]
print(str)


p = input()
s = input()
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = dict()
if p == 'R':
	for i in range(len(a)):
		if i > 0:
			d[a[i]] = a[i - 1]
		else:
			d[a[i]] = ''
else:
	for i in range(len(a)):
		if i < len(a) - 1:
			d[a[i]] = a[i + 1]
		else:
			d[a[i]] = ''
for i in range(len(s)):
	print(d[s[i]], end='')


list1 = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
d = input()
s = input()
s1 = list(s)
if d == 'R':
	add = -1
else:
	add = 1
for i in range(len(s1)):
	for j in range(0, 3):
		index = list1[j].index(s1[i]) if s1[i] in list1[j] else -1
		if index > -1:
			index += add
			s1[i] = list1[j][index]
			break
s2 = ''.join(s1)
print(s2)


direction = str(input())
word = str(input())
keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
for i in range(len(word)):
	character = word[i]
	number = keyboard.index(character)
	if direction is 'L':
		print(keyboard[number + 1], sep='', end='', flush=True)
	else:
		print(keyboard[number - 1], sep='', end='', flush=True)


from sys import stdin
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
(s, w) = [x.rstrip() for x in stdin.readlines()]
d = -1 if s == 'R' else 1
print(''.join([k[k.index(c) + d] for c in w]))


letter = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k2 = input()
s = ''
if letter == 'R':
	for i in range(len(k2)):
		for j in range(len(k)):
			if k2[i] == k[j]:
				s = s + k[j - 1]
if letter == 'L':
	for i in range(len(k2)):
		for j in range(len(k)):
			if k2[i] == k[j]:
				s = s + k[j + 1]
print(s)


der = input()
s = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
s_a = ''
if der == 'R':
	for i in range(len(s)):
		if s[i] in s1:
			s_a += s1[s1.find(s[i]) - 1]
		elif s[i] in s2:
			s_a += s2[s2.find(s[i]) - 1]
		elif s[i] in s3:
			s_a += s3[s3.find(s[i]) - 1]
elif der == 'L':
	for i in range(len(s)):
		if s[i] in s1:
			s_a += s1[s1.find(s[i]) + 1]
		elif s[i] in s2:
			s_a += s2[s2.find(s[i]) + 1]
		elif s[i] in s3:
			s_a += s3[s3.find(s[i]) + 1]
print(s_a)


left_right = input()
input_string = input()
line_top = 'qwertyuiop'
line_mid = 'asdfghjkl;'
line_bottom = 'zxcvbnm,./'
output = ''
line_set = [line_top, line_mid, line_bottom]
for character in input_string:
	for line in line_set:
		for i in line:
			if i == character:
				if left_right == 'R' or left_right == 'r':
					character = line[line.index(i) - 1]
					output += character
				elif line.index(i) < len(line) - 1:
					character = line[line.index(i) + 1]
					output += character
					break
				else:
					print('StringIndexOutOfBoundException....')
print(output)


def ff(x, i, d):
	n = x.find(i) + d
	if n < 0:
		n = 0
	if n == 10:
		n = 9
	return x[n]
c = input()
s = input()
d = 1 if c == 'L' else -1
x = 'qwertyuiop'
y = 'asdfghjkl;'
z = 'zxcvbnm,./'
ans = ''
for i in s:
	if x.find(i) != -1:
		ans += ff(x, i, d)
	if y.find(i) != -1:
		ans += ff(y, i, d)
	if z.find(i) != -1:
		ans += ff(z, i, d)
print(ans)


v = -1 if input() == 'R' else 1
s_in = list(input())
m = [list('qwertyuiop'), list('asdfghjkl;'), list('zxcvbnm,./')]
d = {}
s = []
for (i, s) in enumerate(m):
	for (j, c) in enumerate(s):
		pos = j + v
		if pos < 0 or pos >= len(s):
			continue
		d[c] = s[pos]
s_out = []
for c in s_in:
	s_out.append(d[c])
print(''.join(s_out))


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
if shift == 'L':
	shift = 1
else:
	shift = -1
ss = input()
res = ''
for i in ss:
	res += s[s.find(i) + shift]
print(res)


def Right(Inpt):
	if Inpt == 'w':
		return 'q'
	if Inpt == 'e':
		return 'w'
	if Inpt == 'r':
		return 'e'
	if Inpt == 't':
		return 'r'
	if Inpt == 'y':
		return 't'
	if Inpt == 'u':
		return 'y'
	if Inpt == 'i':
		return 'u'
	if Inpt == 'o':
		return 'i'
	if Inpt == 'p':
		return 'o'
	if Inpt == 's':
		return 'a'
	if Inpt == 'd':
		return 's'
	if Inpt == 'f':
		return 'd'
	if Inpt == 'g':
		return 'f'
	if Inpt == 'h':
		return 'g'
	if Inpt == 'j':
		return 'h'
	if Inpt == 'k':
		return 'j'
	if Inpt == 'l':
		return 'k'
	if Inpt == ';':
		return 'l'
	if Inpt == 'x':
		return 'z'
	if Inpt == 'c':
		return 'x'
	if Inpt == 'v':
		return 'c'
	if Inpt == 'b':
		return 'v'
	if Inpt == 'n':
		return 'b'
	if Inpt == 'm':
		return 'n'
	if Inpt == ',':
		return 'm'
	if Inpt == '.':
		return ','
	if Inpt == '/':
		return '.'

def Left(Inpt):
	if Inpt == 'q':
		return 'w'
	if Inpt == 'w':
		return 'e'
	if Inpt == 'e':
		return 'r'
	if Inpt == 'r':
		return 't'
	if Inpt == 't':
		return 'y'
	if Inpt == 'y':
		return 'u'
	if Inpt == 'u':
		return 'i'
	if Inpt == 'i':
		return 'o'
	if Inpt == 'o':
		return 'p'
	if Inpt == 'a':
		return 's'
	if Inpt == 's':
		return 'd'
	if Inpt == 'd':
		return 'f'
	if Inpt == 'f':
		return 'g'
	if Inpt == 'g':
		return 'h'
	if Inpt == 'h':
		return 'j'
	if Inpt == 'j':
		return 'k'
	if Inpt == 'k':
		return 'l'
	if Inpt == 'l':
		return ';'
	if Inpt == 'z':
		return 'x'
	if Inpt == 'x':
		return 'c'
	if Inpt == 'c':
		return 'v'
	if Inpt == 'v':
		return 'b'
	if Inpt == 'b':
		return 'n'
	if Inpt == 'n':
		return 'm'
	if Inpt == 'm':
		return ','
	if Inpt == ',':
		return '.'
	if Inpt == '.':
		return '/'
Inpt1 = input()
MainInpt = input()
Output = []
Count = 0
if Inpt1 == 'R':
	while len(MainInpt) > Count:
		Output.append(Right(MainInpt[Count]))
		Count += 1
if Inpt1 == 'L':
	while len(MainInpt) > Count:
		Output.append(Left(MainInpt[Count]))
		Count += 1
Count2 = 0
while Count2 < len(Output):
	print(Output[Count2], end='')
	Count2 += 1


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
napr = input('')
stroka = input('')
decoded_str = ''
x = 1
for y in stroka:
	if not y in a:
		x = 0
	if y == ' ':
		x = 0
if len(stroka) > 101:
	x = 0
if x == 1:
	if napr == 'R':
		for x in stroka:
			decoded_str += a[a.index(x) - 1]
	if napr == 'L':
		for x in stroka:
			decoded_str += a[a.index(x) + 1]
	print(decoded_str)


n = input().strip()
p = list(map(str, input().split()))
p = list(p[0])
t = ["qwertyuiop[]asdfghjkl;'zxcvbnm,./"]
t = list(t[0])
for i in range(len(p)):
	for j in range(len(t)):
		if p[i] == t[j]:
			if n == 'R':
				p[i] = t[j - 1]
				break
			elif n == 'L':
				p[i] = t[j + 1]
				break
for i in range(len(p)):
	print(p[i], end='')


shift = input()
string = input()
keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for ch in string:
	print(keys[keys.index(ch) + [1, -1][shift == 'R']], end='')


sequence = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
word = input()
res = ''
if direction == 'R':
	for c in word:
		res += sequence[sequence.index(c) - 1]
elif direction == 'L':
	for c in word:
		res += sequence[sequence.index(c) + 1]
print(res)


p = input()
s = input()
n = ''
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
for i in range(len(s)):
	if p == 'R':
		j = -1
	elif p == 'L':
		j = 1
	if a.find(s[i]) != -1:
		n += a[a.find(s[i]) + j]
	elif b.find(s[i]) != -1:
		n += b[b.find(s[i]) + j]
	elif c.find(s[i]) != -1:
		n += c[c.find(s[i]) + j]
print(n)


s = []
s.append('qwertyuiop')
s.append('asdfghjkl;')
s.append('zxcvbnm,./')
jud = input()
if jud == 'R':
	mov = -1
else:
	mov = 1
boo = False
a = input()
for i in range(len(a)):
	boo = False
	for j in range(3):
		for k in range(10):
			if s[j][k] == a[i]:
				print(s[j][k + mov], end='')
				boo = True
				break
		if boo:
			break
print()


d = input()
t = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	for i in t:
		print(k[k.index(i) - 1], end='')
else:
	for i in t:
		print(k[k.index(i) + 1], end='')


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest, _heapify_max, _heapreplace_max
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as c
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
mat = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
shift = data()
s = data()
answer = []
for i in s:
	pos = 0
	if i in mat[1]:
		pos = 1
	if i in mat[2]:
		pos = 2
	if shift == 'R':
		answer.append(mat[pos][mat[pos].index(i) - 1])
	else:
		answer.append(mat[pos][mat[pos].index(i) + 1])
out(''.join(answer))


string = input()
check = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in input():
	print(check[check.index(i) + [1, -1][string == 'R']], end='')


config = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
letter = input()
k = 0
if letter == 'R':
	sdvig = -1
elif letter == 'L':
	sdvig = 1
line = input()
a = list(line)
for m in range(k, len(a)):
	for i in range(len(config)):
		for j in range(len(config[i])):
			if config[i][j] == a[m]:
				a[m] = config[i][j + sdvig]
				k += 1
				break
line = str()
for i in range(len(a)):
	line += a[i]
print(line)


a = str(input())
b = str(input())
c = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]
for i in range(len(b)):
	for j in range(3):
		for k in range(10):
			if c[j][k] == b[i]:
				if a[0] == 'R':
					print(c[j][k - 1], end='')
				else:
					print(c[j][k + 1], end='')


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
d = input()
s = input()
if d == 'R':
	for i in s:
		f = s1.find(i)
		if f != -1:
			print(s1[f - 1], end='')
		else:
			f = s2.find(i)
			if f != -1:
				print(s2[f - 1], end='')
			else:
				f = s3.find(i)
				print(s3[f - 1], end='')
else:
	for i in s:
		f = s1.find(i)
		if f != -1:
			print(s1[f + 1], end='')
		else:
			f = s2.find(i)
			if f != -1:
				print(s2[f + 1], end='')
			else:
				f = s3.find(i)
				print(s3[f + 1], end='')


n = input()
text = input()
up = 'qwertyuiop'
mid = 'asdfghjkl;'
down = 'zxcvbnm,./'
total = list(up + mid + down)
word = ''

def find(n, text, total):
	word = ''
	if n == 'L':
		for i in text:
			if i in total:
				word += total[total.index(i) + 1]
	elif n == 'R':
		for i in text:
			if i in total:
				word += total[total.index(i) - 1]
	return word
print(find(n, text, total))


s = input()
a = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = ''
for i in range(len(a)):
	if s == 'R':
		l += k[k.index(a[i]) - 1]
	else:
		l += k[k.index(a[i]) + 1]
print(l)


Nap = input()
Kod = input()
St1 = 'qwertyuiop'
St2 = 'asdfghjkl;'
St3 = 'zxcvbnm,./'
if Nap == 'R':
	for i in range(len(Kod)):
		if Kod[i] in St1:
			j = St1.index(Kod[i])
			print(St1[j - 1], end='')
		if Kod[i] in St2:
			j = St2.index(Kod[i])
			print(St2[j - 1], end='')
		if Kod[i] in St3:
			j = St3.index(Kod[i])
			print(St3[j - 1], end='')
if Nap == 'L':
	for i in range(len(Kod)):
		if Kod[i] in St1:
			j = St1.index(Kod[i])
			print(St1[j + 1], end='')
		if Kod[i] in St2:
			j = St2.index(Kod[i])
			print(St2[j + 1], end='')
		if Kod[i] in St3:
			j = St3.index(Kod[i])
			print(St3[j + 1], end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
miss = input()
if miss == 'R':
	opt = -1
else:
	opt = 1
text = input()
for i in range(len(text)):
	print(keyboard[keyboard.index(text[i]) + opt], sep='', end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
lt = s.replace('', ' ').split()
direction = input()
read = input()
out = []
for i in range(0, len(read)):
	x = lt.index(read[i])
	if direction == 'R':
		out.append(lt[x - 1])
	else:
		out.append(lt[x + 1])
print(''.join(out))


kb = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
(chr, chc) = ({}, {})
for (r, s) in enumerate(kb):
	for (c, ch) in enumerate(s):
		(chr[ch], chc[ch]) = (r, c)
o = 1 if input() == 'L' else -1
for ch in input():
	print(kb[chr[ch]][chc[ch] + o], end='')


N = input()
S = input()
K = 'qwertyuiopasdfghjkl;zxcvbnm,./'
D = ''
for i in range(0, len(S)):
	if N[0] == 'R':
		D += K[K.find(S[i]) - 1]
	else:
		D += K[K.find(S[i]) + 1]
print(D)


print((lambda s, c, a: ''.join([s[s.find(i) + (1 if c == 'L' else -1)] for i in a]))('qwertyuiopasdfghjkl;zxcvbnm,./', input(), input()))


dir = input()
s = input()
s1 = ''
stri1 = 'qwertyuiop'
stri2 = 'asdfghjkl;'
stri3 = 'zxcvbnm,./'
if dir == 'R':
	for i in s:
		if i in stri1:
			ind = stri1.index(i)
			s1 += stri1[ind - 1]
		elif i in stri2:
			ind = stri2.index(i)
			s1 += stri2[ind - 1]
		elif i in stri3:
			ind = stri3.index(i)
			s1 += stri3[ind - 1]
else:
	for i in s:
		if i in stri1:
			ind = stri1.index(i)
			s1 += stri1[ind + 1]
		elif i in stri2:
			ind = stri2.index(i)
			s1 += stri2[ind + 1]
		elif i in stri3:
			ind = stri3.index(i)
			s1 += stri3[ind + 1]
print(s1)


indent = input()
s = input()
_1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']']
_2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'"]
_3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
result = ''
for i in range(len(s)):
	if indent == 'R':
		if s[i] in _1:
			result += _1[_1.index(s[i]) - 1]
		elif s[i] in _2:
			result += _2[_2.index(s[i]) - 1]
		else:
			result += _3[_3.index(s[i]) - 1]
	elif s[i] in _1:
		result += _1[_1.index(s[i]) + 1]
	elif s[i] in _2:
		result += _2[_2.index(s[i]) + 1]
	else:
		result += _3[_3.index(s[i]) + 1]
print(result)


d = input()
s = str(input())
n = ''
x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	for i in s:
		n += x[x.index(i) - 1]
if d == 'L':
	for i in s:
		n += x[x.index(i) + 1]
print(n)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = []
while True:
	try:
		b.append(input())
	except:
		break
c = b[1]
s = ''
for i in range(len(b[1])):
	if b[0] == 'R':
		s += a[a.find(c[i]) - 1]
	else:
		s += a[a.find(c[i]) + 1]
print(s)


rol = input()
sen = list(input())
f = list('qwertyuiop')
s = list('asdfghjkl;')
t = list('zxcvbnm,./')
if rol == 'R':
	for i in range(len(sen)):
		if sen[i] in f:
			sen[i] = f[f.index(sen[i]) - 1]
		elif sen[i] in s:
			sen[i] = s[s.index(sen[i]) - 1]
		elif sen[i] in t:
			sen[i] = t[t.index(sen[i]) - 1]
elif rol == 'L':
	for i in range(len(sen)):
		if sen[i] in f:
			sen[i] = f[f.index(sen[i]) + 1]
		elif sen[i] in s:
			sen[i] = s[s.index(sen[i]) + 1]
		elif sen[i] in t:
			sen[i] = t[t.index(sen[i]) + 1]
print(''.join(sen))


s = input()
lis = list(input())
A = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
B = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
C = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
n = len(lis)
if s == 'L':
	for i in range(n):
		if lis[i] in A:
			lis[i] = A[A.index(lis[i]) + 1]
		elif lis[i] in B:
			lis[i] = B[B.index(lis[i]) + 1]
		else:
			lis[i] = C[C.index(lis[i]) + 1]
	print(''.join(lis))
else:
	for i in range(n):
		if lis[i] in A:
			lis[i] = A[A.index(lis[i]) - 1]
		elif lis[i] in B:
			lis[i] = B[B.index(lis[i]) - 1]
		else:
			lis[i] = C[C.index(lis[i]) - 1]
	print(''.join(lis))


a = str(input())
b = list(str(input()))
c = list(str('qwertyuiop'))
d = list(str('asdfghjkl;'))
e = list(str('zxcvbnm,./'))
x = []
if a == 'R':
	for i in b:
		if i in c:
			z = c.index(i)
			y = c[z - 1]
			x.append(y)
		elif i in d:
			z = d.index(i)
			y = d[z - 1]
			x.append(y)
		elif i in e:
			z = e.index(i)
			y = e[z - 1]
			x.append(y)
if a == 'L':
	for i in b:
		if i in c:
			z = c.index(i)
			y = c[z + 1]
			x.append(y)
		elif i in d:
			z = d.index(i)
			y = d[z + 1]
			x.append(y)
		elif i in e:
			z = e.index(i)
			y = e[z + 1]
			x.append(y)
print(''.join(x))


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
R = {}
L = {}
for row in keyboard:
	for i in range(1, len(row)):
		R[row[i]] = row[i - 1]
	R[row[0]] = row[0]
	for i in range(len(row) - 1):
		L[row[i]] = row[i + 1]
	L[row[-1]] = row[-1]
lr = input()
s = input()
if lr == 'R':
	ans = ''.join([R[v] for v in s])
	print(ans)
else:
	ans = ''.join([L[v] for v in s])
	print(ans)


a = input()
String = input()
alpharray = "qwertyuiop[]asdfghjkl;''zxcvbnm,./"
ans = ''
for i in String:
	if a == 'R':
		ans += alpharray[alpharray.find(i) - 1]
	else:
		ans += alpharray[alpharray.find(i) + 1]
print(ans)


def KeyBoard(d, s):
	if d == 'R':
		c = -1
	if d == 'L':
		c = 1
	res = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	s1 = ''
	for i in range(len(s)):
		j = res.index(s[i])
		s1 = s1 + res[j + c]
	return s1
x = input()
s = input()
print(KeyBoard(x, s))


l = input()
key1 = 'qwertyuiop'
key2 = 'asdfghjkl;'
key3 = 'zxcvbnm,./'
sen = input()
ans = ''
for letter in sen:
	if letter in key1:
		ind = key1.index(letter)
		if l == 'R':
			if ind == 0:
				ans += key1[-1]
			else:
				ans += key1[ind - 1]
		elif l == 'L':
			if ind == len(key1) - 1:
				ans += key1[0]
			else:
				ans += key1[ind + 1]
	elif letter in key2:
		ind = key2.index(letter)
		if l == 'R':
			if ind == 0:
				ans += key2[-1]
			else:
				ans += key2[ind - 1]
		elif l == 'L':
			if ind == len(key2) - 1:
				ans += key2[0]
			else:
				ans += key2[ind + 1]
	elif letter in key3:
		ind = key3.index(letter)
		if l == 'R':
			if ind == 0:
				ans += key3[-1]
			else:
				ans += key3[ind - 1]
		elif l == 'L':
			if ind == len(key3) - 1:
				ans += key3[0]
			else:
				ans += key3[ind + 1]
print(ans)


dir = input()
str = input()
str1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if dir == 'R':
	for i in str:
		a = str1.find(i)
		print(str1[a - 1:a], end='')
else:
	for i in str:
		a = str1.find(i)
		print(str1[a + 1:a + 2], end='')


key = input()
s = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
output = ''
if key == 'R':
	for i in s:
		output += keyboard[keyboard.index(i) - 1]
else:
	for i in s:
		output += keyboard[keyboard.index(i) + 1]
print(output)


def main():
	c = input()
	s = input()
	t = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
	if c == 'L':
		dic_l = {'q': (0, 1), 'w': (0, 2), 'e': (0, 3), 'r': (0, 4), 't': (0, 5), 'y': (0, 6), 'u': (0, 7), 'i': (0, 8), 'o': (0, 9), 'p': (0, 10), 'a': (1, 1), 's': (1, 2), 'd': (1, 3), 'f': (1, 4), 'g': (1, 5), 'h': (1, 6), 'j': (1, 7), 'k': (1, 8), 'l': (1, 9), ';': (1, 10), 'z': (2, 1), 'x': (2, 2), 'c': (2, 3), 'v': (2, 4), 'b': (2, 5), 'n': (2, 6), 'm': (2, 7), ',': (2, 8), '.': (2, 9), '/': (2, 10)}
		for ch in s:
			coord = dic_l[ch]
			print(t[coord[0]][coord[1]], end='')
		print()
	else:
		dic_r = {'q': (0, -1), 'w': (0, 0), 'e': (0, 1), 'r': (0, 2), 't': (0, 3), 'y': (0, 4), 'u': (0, 5), 'i': (0, 6), 'o': (0, 7), 'p': (0, 8), 'a': (1, -1), 's': (1, 0), 'd': (1, 1), 'f': (1, 2), 'g': (1, 3), 'h': (1, 4), 'j': (1, 5), 'k': (1, 6), 'l': (1, 7), ';': (1, 8), 'z': (2, -1), 'x': (2, 0), 'c': (2, 1), 'v': (2, 2), 'b': (2, 3), 'n': (2, 4), 'm': (2, 5), ',': (2, 6), '.': (2, 7), '/': (2, 8)}
		for ch in s:
			coord = dic_r[ch]
			print(t[coord[0]][coord[1]], end='')
		print()
main()


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = input()
msg = input()
actual = ''
for i in range(len(msg)):
	a = keyboard.index(msg[i])
	if s[0] == 'R':
		actual += keyboard[a - 1]
	else:
		actual += keyboard[a + 1]
print(actual)


res = ''
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
pos = input()
word = input()
if pos == 'R':
	for i in range(len(word)):
		res = res + key[key.find(word[i]) - 1]
else:
	for i in range(len(word)):
		res = res + key[key.find(word[i]) + 1]
print(res)


layer1 = 'qwertyuiop'
layer2 = 'asdfghjkl;'
layer3 = 'zxcvbnm,./'
x = input()
word = input()
if x == 'R':
	count = -1
else:
	count = 1
for u in word:
	if u in layer1:
		print(layer1[layer1.find(u) + count], end='')
	elif u in layer2:
		print(layer2[layer2.find(u) + count], end='')
	else:
		print(layer3[layer3.find(u) + count], end='')


c = input()
s = input()
t = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
dic = dict()
for y in range(3):
	for x in range(10):
		dic[t[y][x]] = (y, x)
d = 1 if c == 'L' else -1
new_s = ''
for ch in s:
	coord = dic[ch]
	new_s += t[coord[0]][coord[1] + d]
print(new_s)


k1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k2 = 'wertyuiopasdfghjkl;zxcvbnm,./q'
x = input()
s = input()
if x == 'R':
	print(s.translate(s.maketrans(k2, k1)))
else:
	print(s.translate(s.maketrans(k1, k2)))


kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'

def translateleft(char):
	return kb[kb.index(char) - 1]

def translateright(char):
	return kb[kb.index(char) + 1]
dir = input()
s = input()
if dir == 'L':
	print(''.join([translateright(char) for char in s]))
else:
	print(''.join([translateleft(char) for char in s]))


def mensaje(cod, mensa):
	teclado = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	traduccion = []
	for i in range(0, len(mensa)):
		for j in range(0, len(teclado)):
			if cod == 'r' or cod == 'R':
				if mensa[i] == teclado[j]:
					letra = teclado[j - 1]
					traduccion.append(letra)
			elif mensa[i] == teclado[j]:
				letra = teclado[j + 1]
				traduccion.append(letra)
	return traduccion

def main():
	a = input()
	b = input()
	mensajeT = mensaje(a, b)
	print(''.join(mensajeT))
main()


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d1 = {}
d2 = {}
for i in range(1, len(keyboard) + 1):
	d1[i] = keyboard[i - 1]
	d2[keyboard[i - 1]] = i
s = input()
l = list(input())
for i in range(len(l)):
	index = d2[l[i]]
	if s == 'R':
		l[i] = d1[index - 1]
	else:
		l[i] = d1[index + 1]
for i in l:
	print(i, end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
w = input()
msg = input()
st = ''
if w == 'R':
	for i in range(len(msg)):
		index = s.find(msg[i])
		st += s[index - 1]
else:
	for i in range(len(msg)):
		index = s.find(msg[i])
		st += s[index + 1]
print(st)


direction = -1 if input() == 'R' else 1
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
ans = []
for x in input():
	for i in range(3):
		if x in keyboard[i]:
			ans.append(keyboard[i][keyboard[i].index(x) + direction])
print(''.join(ans))


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = [-1, 1][input() == 'L']
typed = input()
meant = ''
for i in typed:
	meant += alpha[alpha.find(i) + direction]
print(meant)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = dict()
for i in range(0, len(keyboard)):
	d[keyboard[i]] = i
t = input()
string = input()
k = 0
if t == 'L':
	k = 1
if t == 'R':
	k = -1
result = str()
for i in range(0, len(string)):
	index = d[string[i]] + k
	if index < 0:
		len(keyboard) - 1
	if index > len(keyboard) - 1:
		index = 0
	result = result + keyboard[index]
print(result)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'

def main():
	p = input()
	s = input()
	a = ''
	if p == 'L':
		d = 1
	else:
		d = -1
	for i in s:
		for j in [s1, s2, s3]:
			if i in j:
				q = j.find(i) + d
				q = max(q, 0)
				q = min(len(j) - 1, q)
				a += j[q]
	print(a)
main()


is_left = lambda dirction: dirction == 'L'

def decode_sentence(sentence, dirction):
	keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	dirction = 1 if is_left(dirction) else -1
	sentence_decoded = [keyboard.find(sentence[char]) + dirction for char in range(len(sentence))]
	decode = lambda index: keyboard[index]
	return ''.join(map(decode, sentence_decoded))
dirction = input()
sentence = input()
print(decode_sentence(sentence, dirction))


s = input()
m = input()
p = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if s == 'R':
	t = ''
	for i in m:
		if i == 'q':
			t = t + 'p'
		else:
			t = t + p[p.index(i) - 1]
else:
	t = ''
	for i in m:
		if i == '/':
			t = t + 'z'
		else:
			t = t + p[p.index(i) + 1]
print(t)


keyboard = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]

def get_location(char):
	for row in range(10):
		for col in range(10):
			if keyboard[row][col] == char:
				return (row, col)
shift = input()
word = input()
new_word = ''
if shift == 'R':
	for char in word:
		(row, col) = get_location(char)
		new_word += keyboard[row][col - 1]
else:
	for char in word:
		(row, col) = get_location(char)
		new_word += keyboard[row][col + 1]
print(new_word)


a = input()
b = list(input())
c = 'qwertyuiop'
d = 'asdfghjkl;'
e = 'zxcvbnm,./'
for i in range(len(b)):
	if a == 'L':
		if b[i] in c:
			b[i] = c[c.index(b[i]) + 1]
		elif b[i] in d:
			b[i] = d[d.index(b[i]) + 1]
		else:
			b[i] = e[e.index(b[i]) + 1]
	elif b[i] in c:
		b[i] = c[c.index(b[i]) - 1]
	elif b[i] in d:
		b[i] = d[d.index(b[i]) - 1]
	else:
		b[i] = e[e.index(b[i]) - 1]
print(''.join(b))


def solve(d, s):
	line1 = 'qwertyuiop'
	line2 = 'asdfghjkl;'
	line3 = 'zxcvbnm,./'
	ans = ''
	for i in range(len(s)):
		if s[i] in line1:
			ans += line1[line1.index(s[i]) + d]
		elif s[i] in line2:
			ans += line2[line2.index(s[i]) + d]
		elif s[i] in line3:
			ans += line3[line3.index(s[i]) + d]
	return ans
d = 0
if input() == 'R':
	d = -1
else:
	d = 1
print(solve(d, input()))


d = input().strip()
s = input().strip()
if d == 'L':
	l = 1
else:
	l = -1
c1 = 'qwertyuiop'
c2 = 'asdfghjkl;'
c3 = 'zxcvbnm,./'
for i in s:
	if i in c1:
		print(c1[c1.find(i) + l], end='')
	if i in c2:
		print(c2[c2.find(i) + l], end='')
	if i in c3:
		print(c3[c3.find(i) + l], end='')


s = input()
r = input()
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
p = ''
if s == 'R':
	for i in r:
		p += l[l.find(i) - 1]
else:
	for i in r:
		p += l[l.find(i) + 1]
print(p)


n = str(input())
s = str(input())
step = 0
if n == 'L':
	step = 1
else:
	step = -1
arr = 'qwertyuiopasdfghjkl;zxcvbnm,./'
answer = ''
for letter in s:
	index = arr.find(letter)
	answer += arr[index + step]
print(answer)


seq = 'qwertyuiopasdfghjkl;zxcvbnm,./'
seq_corrected = ''
oder = input()
seq_wrong = input()
if oder == 'R':
	for i in range(len(seq_wrong)):
		seq_corrected += seq[seq.index(seq_wrong[i]) - 1]
else:
	for i in range(len(seq_wrong)):
		seq_corrected += seq[seq.index(seq_wrong[i]) + 1]
print(seq_corrected)


l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = int(1)
if input() == 'R':
	c = int(-1)
ans = ''
s = input()
for i in range(len(s)):
	ans += l[l.index(s[i]) + c]
print(ans)


direction = input()
characters = input()
p = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if direction == 'L':
	d = 1
else:
	d = -1
new = ''
for i in characters:
	new += p[p.index(i) + d]
print(new)


n = input().strip()
pp = input().strip()
ll = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if n == 'R':
	n = -1
elif n == 'L':
	n = 1
l = ''
for i in range(0, len(pp)):
	l = l + ll[ll.find(pp[i]) + n]
print(l)


c = input()
w = input()
st = ''
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if c == 'R':
	for i in w:
		st += s[s.index(i) - 1]
else:
	for i in w:
		st += s[s.index(i) + 1]
print(st)


x = input()
y = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
d = ''
for i in y:
	if x == 'R' and i in a:
		i = a.index(i) - 1
		d = d + a[i]
	elif x == 'R' and i in b:
		i = b.index(i) - 1
		d = d + b[i]
	elif x == 'R' and i in c:
		i = c.index(i) - 1
		d = d + c[i]
	elif x == 'L' and i in a:
		i = a.index(i) + 1
		d = d + a[i]
	elif x == 'L' and i in b:
		i = b.index(i) + 1
		d = d + b[i]
	elif x == 'L' and i in c:
		i = c.index(i) + 1
		d = d + c[i]
print(d)


st = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', ' ', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'", ' ', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
letter = str(input())
word = str(input())
result = ''
if letter == 'R':
	for i in range(len(word)):
		index = st.index(word[i])
		result += st[index - 1]
else:
	for i in range(len(word)):
		index = st.index(word[i])
		result += st[index + 1]
print(result)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
str = input()
if c == 'R':
	for char in str:
		print(s[s.index(char) - 1], end='')
else:
	for char in str:
		print(s[s.index(char) + 1], end='')


hash = {'a': ['', 's'], 'b': ['v', 'n'], 'c': ['x', 'v'], 'd': ['s', 'f'], 'e': ['w', 'r'], 'f': ['d', 'g'], 'g': ['f', 'h'], 'h': ['g', 'j'], 'i': ['u', 'o'], 'j': ['h', 'k'], 'k': ['j', 'l'], 'l': ['k', ';'], 'm': ['n', ','], 'n': ['b', 'm'], 'o': ['i', 'p'], 'p': ['o', ''], 'q': ['', 'w'], 'r': ['e', 't'], 's': ['a', 'd'], 't': ['r', 'y'], 'u': ['y', 'i'], 'v': ['c', 'b'], 'w': ['q', 'e'], 'x': ['z', 'c'], 'y': ['t', 'u'], 'z': ['', 'x'], '.': [',', '/'], ',': ['m', '.'], '/': ['.', ''], ';': ['l', '']}
o = input()
if o == 'L':
	o = 2
else:
	o = 1
o -= 1
s = input()
r = ''
for i in s:
	r += hash[i][o]
print(r)


st1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ch = input()
st2 = input()
if ch == 'R':
	for i in st2:
		print(st1[st1.find(i) - 1], end='')
elif ch == 'L':
	for i in st2:
		print(st1[st1.find(i) + 1], end='')
print()


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
s1 = input()
s2 = input()
k = 1
if s1 == 'R':
	k = -1
for i in range(len(s2)):
	for j in range(10):
		if s2[i] == a[j]:
			print(a[j + k], end='')
			break
		elif s2[i] == b[j]:
			print(b[j + k], end='')
			break
		elif s2[i] == c[j]:
			print(c[j + k], end='')
			break


keyboard = list('qwertyuiopasdfghjkl;zxcvbnm,./')
x = input()
if x == 'R':
	x = -1
else:
	x = 1
string = input()
for letter in string:
	print(keyboard[(keyboard.index(letter) + x) % len(keyboard)], end='')


x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
a = input()
print(''.join(list(map(lambda i: x[x.index(i) - 1], a))) if n == 'R' else ''.join(list(map(lambda i: x[x.index(i) + 1], a))))


n = input()
s = input()
s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if n == 'L':
	for i in range(len(s)):
		for j in range(len(s1)):
			if s[i] == s1[j]:
				print(s1[j + 1], end='')
else:
	for i in range(len(s)):
		for j in range(len(s1)):
			if s[i] == s1[j]:
				print(s1[j - 1], end='')


key_board = list('qwertyuiopasdfghjkl;zxcvbnm,./')
LR = input()
words = list(input())
nw = []
if LR == 'R':
	for i in words:
		nw.append(key_board[key_board.index(i) - 1])
else:
	for i in words:
		nw.append(key_board[key_board.index(i) + 1])
print(''.join(nw))


n = input()
s = input()
l = list(s)
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if n == 'R':
	for i in range(len(s)):
		m = l[i]
		b = a.index(m)
		p = a[b - 1]
		l[i] = p
else:
	for i in range(len(s)):
		m = l[i]
		b = a.index(m)
		p = a[b + 1]
		l[i] = p
print(''.join((str(e) for e in l)))


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
L = input()
n = input()
st = ''
for i in n:
	if L == 'R':
		st += a[a.find(i) - 1]
	else:
		st += a[a.find(i) + 1]
print(st)


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def def_value():
	return 0

def main():
	C = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	s = input()
	a = input()
	for i in a:
		pos = C.find(i)
		if s == 'L':
			print(C[pos + 1], end='')
		else:
			print(C[pos - 1], end='')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


import os
import sys
from math import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return map(int, input().split())

def array():
	return [int(i) for i in input().split()]
c = 0
d = {}
l = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
for i in l:
	d[i] = c
	c += 1
f = input()
s = input()
if f == 'R':
	for i in s:
		print(l[d[i] - 1], end='')
else:
	for i in s:
		print(l[d[i] + 1], end='')


c = input()
s = input()
line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
res = ''
for x in s:
	if x in line1:
		if c == 'R':
			for i in range(1, 10):
				if line1[i] == x:
					res += line1[i - 1]
					break
		else:
			for i in range(0, 9):
				if line1[i] == x:
					res += line1[i + 1]
					break
	elif x in line2:
		if c == 'R':
			for i in range(1, 10):
				if line2[i] == x:
					res += line2[i - 1]
					break
		else:
			for i in range(0, 9):
				if line2[i] == x:
					res += line2[i + 1]
					break
	elif x in line3:
		if c == 'R':
			for i in range(1, 10):
				if line3[i] == x:
					res += line3[i - 1]
					break
		else:
			for i in range(0, 9):
				if line3[i] == x:
					res += line3[i + 1]
					break
print(res)


import sys
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
s = input()
ans = ''
for c in s:
	if d == 'R':
		ans += key[key.find(c) - 1]
	else:
		ans += key[key.find(c) + 1]
print(ans)


A = ['qwertyuiop', 'asdfghjkl;zxcvbnm,./']
R = {}
for a in A:
	for i in range(len(a)):
		if i == 0:
			pass
		else:
			R[a[i]] = a[i - 1]
L = {}
for a in A:
	for i in range(len(a)):
		if i == len(a) - 1:
			pass
		else:
			L[a[i]] = a[i + 1]
shift = input()
s = input()
ans = ''
for i in range(len(s)):
	if shift == 'R':
		ans += R[s[i]]
	else:
		ans += L[s[i]]
print(ans)


direction = input()
Str = input()
Keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
output = ''
if direction == 'R':
	d = -1
else:
	d = 1
for i in range(len(Str)):
	for j in range(len(Keyboard)):
		if Str[i] == Keyboard[j]:
			output += Keyboard[j + d]
print(output)


side = input()
string = input()
n = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = ' qwertyuio asdfghjkl;zxcvbnm,./'
r = 'wertyuiop sdfghjkl; xcvbnm,./'
dic = dict(zip(list(r) if side == 'R' else list(l), n))
newa = []
for i in string:
	a = dic[i]
	newa.append(a)
print(''.join([dic[i] for i in string]))


dir = input()
string1 = input()
row1 = 'qwertyuiop'
row2 = 'asdfghjkl;'
row3 = 'zxcvbnm,./'
answer = ''
for i in string1:
	if i in row1:
		temp = row1.index(i)
		if dir == 'L':
			answer += row1[temp + 1]
		if dir == 'R':
			answer += row1[temp - 1]
	if i in row2:
		temp = row2.index(i)
		if dir == 'L':
			answer += row2[temp + 1]
		if dir == 'R':
			answer += row2[temp - 1]
	if i in row3:
		temp = row3.index(i)
		if dir == 'L':
			answer += row3[temp + 1]
		if dir == 'R':
			answer += row3[temp - 1]
print(answer)


line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
direction = input()
word = input()
res = ''
if direction == 'R':
	for c in word:
		if c in line1:
			res += line1[line1.index(c) - 1]
		elif c in line2:
			res += line2[line2.index(c) - 1]
		elif c in line3:
			res += line3[line3.index(c) - 1]
if direction == 'L':
	for c in word:
		if c in line1:
			res += line1[line1.index(c) + 1]
		elif c in line2:
			res += line2[line2.index(c) + 1]
		elif c in line3:
			res += line3[line3.index(c) + 1]
print(res)


lr = input().strip()
s = input().strip()
st = dict()
st[0] = 'qwertyuiop'
st[1] = 'asdfghjkl;'
st[2] = 'zxcvbnm,./'
L = dict()
R = dict()
for i in range(3):
	for j in range(len(st[i]) - 1):
		R[st[i][j]] = st[i][j + 1]
		L[st[i][j + 1]] = st[i][j]
if lr == 'L':
	print(''.join([R[a] for a in s]))
else:
	print(''.join([L[a] for a in s]))


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'R':
	ans = ''
	for i in range(len(b)):
		p = c.find(b[i])
		ans += c[p - 1]
if a == 'L':
	ans = ''
	for i in range(len(b)):
		p = c.find(b[i])
		ans += c[p + 1]
print(ans)


d = str(input())
q = str(input())
temp = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if d == 'R':
	for i in q:
		index = temp.index(i)
		ans += str(temp[index - 1])
else:
	for i in q:
		index = temp.index(i)
		ans += str(temp[index + 1])
print(ans)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
q = {}
for i in range(len(s)):
	q[s[i]] = i
r = str(input())
if r == 'R':
	r = -1
else:
	r = 1
ns = str(input())
ans = ''
for i in ns:
	ans += s[q[i] + r]
print(ans)


LR = input()
message = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(message)):
	for j in range(len(key)):
		if message[i] == key[j]:
			if LR == 'R':
				print(key[j - 1], end='')
			else:
				print(key[j + 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
s = input()
if c == 'L':
	m = +1
else:
	m = -1
ans = ''.join([a[a.index(char) + m] for char in s])
print(ans)


l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
t = input()
if t == 'R':
	i = -1
else:
	i = 1
S = input()
a = []
for s in S:
	if s in l1:
		a += l1[l1.index(s) + i]
	elif s in l2:
		a += l2[l2.index(s) + i]
	else:
		a += l3[l3.index(s) + i]
print(''.join(a))


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input().upper()
x = input()
out = ''
if d == 'R':
	for i in range(len(x)):
		for j in range(len(s)):
			if x[i] == s[j]:
				out = out + s[j - 1]
else:
	for i in range(len(x)):
		for j in range(len(s)):
			if x[i] == s[j]:
				out = out + s[j + 1]
print(out)


def toedRight(String):
	letterBank = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
	k = letterBank.index(String)
	returnString = letterBank[k - 1]
	return returnString

def toedLeft(String):
	letterBank = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
	k = letterBank.index(String)
	returnString = letterBank[k + 1]
	return returnString
y = input('')
z = input('')
if y == 'R':
	newWord = ''
	listOfLetters = z
	for value in listOfLetters:
		addend = toedRight(value)
		newWord += addend
if y == 'L':
	newWord = ''
	listOfLetters = z
	for value in listOfLetters:
		addend = toedLeft(value)
		newWord += addend
print(newWord)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if input() == 'R':
	direction = -1
else:
	direction = 1
message = input()
original_message = ''
for char in message:
	idx = keyboard.index(char)
	original_message += keyboard[idx + direction]
print(original_message)


import math
import sys
import string

def ri():
	return input()

def ii():
	return int(input())

def li():
	return input().split()

def mi():
	return list(map(int, input().split()))
l = ri()
s = ri()
alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if l == 'R':
	for i in s:
		asc = alpha.index(i)
		asc -= 1
		ans += alpha[asc]
else:
	for i in s:
		asc = alpha.index(i)
		asc += 1
		ans += alpha[asc]
print(ans)


p = input()
s = input()
f = ''
a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(s)):
	x = a.find(s[i])
	if p == 'R':
		f += a[x - 1]
	else:
		f += a[x + 1]
print(f)


s = input().strip()
t = input().strip()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for elem in t:
	print(keyboard[keyboard.index(elem) - 1] if s == 'R' else keyboard[keyboard.index(elem) + 1], end='')


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
z = input()
m = input()
for i in range(0, len(m)):
	l = k.index(m[i])
	if z == 'R':
		print(k[l - 1], end='')
	else:
		print(k[l + 1], end='')


a1 = 'qwertyuiop'
a2 = 'asdfghjkl;'
a3 = 'zxcvbnm,./'
q = input()
s = input()
p = ''
if q == 'R':
	for i in s:
		if i == a1[0] or i == a2[0] or i == a3[0]:
			p = p + i
		if i in a1:
			t = a1.index(i)
			p = p + a1[t - 1]
		elif i in a2:
			t = a2.index(i)
			p = p + a2[t - 1]
		elif i in a3:
			t = a3.index(i)
			p = p + a3[t - 1]
if q == 'L':
	for i in s:
		if i == a1[9] or i == a2[9] or i == a3[9]:
			p = p + i
		if i in a1:
			t = a1.index(i)
			p = p + a1[t + 1]
		elif i in a2:
			t = a2.index(i)
			p = p + a2[t + 1]
		elif i in a3:
			t = a3.index(i)
			p = p + a3[t + 1]
print(p)


f = 'qwertyuiopasdfghjkl;zxcvbnm,./'
f = list(f)
c = input()
s = ''
if c == 'R':
	c = -1
else:
	c = 1
g = input()
for i in g:
	s += f[f.index(i) + c]
print(s)


location = input()
data = input()
data_base = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in data:
	a = data_base.index(i)
	if location == 'L':
		print(data_base[a + 1], end='')
	else:
		print(data_base[a - 1], end='')


let = input()
s = input()
st = list('qwertyuiopasdfghjkl;zxcvbnm,./')
com = -1 if let == 'R' else 1
re = ''
for i in range(len(s)):
	ind = st.index(s[i])
	re = re + st[ind + com]
print(re)


kb = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
d = input()
s = ''
for c in input():
	for i in range(3):
		for j in range(len(kb[i])):
			if kb[i][j] == c:
				s += kb[i][j - 1] if d == 'R' else kb[i][j + 1]
print(s)


x = input()
y = list(input())
a = list('qwertyuiopasdfghjkl;zxcvbnm,./')
if x == 'R':
	for i in y:
		print(a[a.index(i) - 1], end='')
	exit()
for i in y:
	print(a[a.index(i) + 1], end='')


patron = input()
letras = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '{', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
mamada = input()
mamadabuena = ''
if patron == 'R':
	for k in mamada:
		posicion = letras.index(k)
		mamadabuena += letras[posicion - 1]
else:
	for k in mamada:
		posicion = letras.index(k)
		mamadabuena += letras[posicion + 1]
print(mamadabuena)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
keyboard = list(keyboard)
dir = input()
line = input()
ans = ''
if dir == 'R':
	for i in range(len(line)):
		ans = ans + keyboard[keyboard.index(line[i]) - 1]
else:
	for i in range(len(line)):
		ans = ans + keyboard[keyboard.index(line[i]) + 1]
print(ans)


char1 = input()
key1 = 'qwertyuiop'
key2 = 'asdfghjkl;'
key3 = 'zxcvbnm,./'
key = key1 + key2 + key3
coded = input()
decoded = ''
for p in coded:
	if char1 == 'R':
		decoded = decoded + key[key.find(p) - 1]
	elif char1 == 'L':
		decoded = decoded + key[key.find(p) + 1]
print(decoded)


shift = input()
s = input()
u = ''
l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
for i in s:
	if i in l1 and shift == 'L':
		u = u + l1[l1.index(i) + 1]
	elif i in l2 and shift == 'L':
		u = u + l2[l2.index(i) + 1]
	elif i in l3 and shift == 'L':
		u = u + l3[l3.index(i) + 1]
	elif i in l1 and shift == 'R':
		u = u + l1[l1.index(i) - 1]
	elif i in l2 and shift == 'R':
		u = u + l2[l2.index(i) - 1]
	elif i in l3 and shift == 'R':
		u = u + l3[l3.index(i) - 1]
print(u)


direction = input()
s = input()
keys = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
(left, right) = ({}, {})
for key in keys:
	for i in range(1, len(key)):
		left[key[i]] = key[i - 1]
	for i in range(len(key) - 1):
		right[key[i]] = key[i + 1]
ans = ''
for x in s:
	if direction == 'R':
		ans += left[x]
	else:
		ans += right[x]
print(ans)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
t = {}
if x == 'R':
	for i in range(1, len(a)):
		t[a[i]] = a[i - 1]
else:
	for i in range(len(a) - 1):
		t[a[i]] = a[i + 1]
for i in input():
	print(t[i], end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
s = input()
ans = ''
if d == 'R':
	for c in s:
		ans += keyboard[keyboard.find(c) - 1]
else:
	for c in s:
		ans += keyboard[keyboard.find(c) + 1]
print(ans)


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
e = ''
if a == 'R':
	for i in range(0, len(b)):
		d = c.index(b[i])
		e = e + c[d - 1]
else:
	for i in range(0, len(b)):
		d = c.index(b[i])
		e = e + c[d + 1]
print(e)


from sys import stdin
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'

def search_w(a, b, c, letter):
	for i in range(0, 10):
		if a[i] == letter:
			pos = ['a', i]
			return pos
		if b[i] == letter:
			pos = ['b', i]
			return pos
		if c[i] == letter:
			pos = ['c', i]
			return pos
direction = stdin.readline().strip()
message = stdin.readline().strip()
if direction == 'R':
	move = -1
else:
	move = 1
original = ''
for i in range(0, len(message)):
	pos = search_w(a, b, c, message[i])
	if pos[0] == 'a':
		original = original + a[pos[1] + move]
	if pos[0] == 'b':
		original = original + b[pos[1] + move]
	if pos[0] == 'c':
		original = original + c[pos[1] + move]
print(original)


hat = input()
given = input()
up = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
middle = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
down = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
lst = []
final = ''
for i in given:
	lst.append(i)
if hat == 'R':
	for i in range(len(lst)):
		if lst[i] in up:
			if up.index(lst[i]) >= 1:
				final += up[up.index(lst[i]) - 1]
			else:
				final += lst[i]
		elif lst[i] in middle:
			if middle.index(lst[i]) >= 1:
				final += middle[middle.index(lst[i]) - 1]
			else:
				final += lst[i]
		elif down.index(lst[i]) >= 1:
			final += down[down.index(lst[i]) - 1]
		else:
			final += lst[i]
else:
	for i in range(len(lst)):
		if lst[i] in up:
			if up.index(lst[i]) < 9:
				final += up[up.index(lst[i]) + 1]
			else:
				final += lst[i]
		elif lst[i] in middle:
			if middle.index(lst[i]) < 9:
				final += middle[middle.index(lst[i]) + 1]
			else:
				final += lst[i]
		elif down.index(lst[i]) < 9:
			final += down[down.index(lst[i]) + 1]
		else:
			final += lst[i]
print(final)


S = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
direction = input()
inp = input()
ans = []
for s in inp:
	for i in range(3):
		if s in S[i]:
			if direction == 'L':
				ans.append(S[i][S[i].find(s) + 1])
			else:
				ans.append(S[i][S[i].find(s) - 1])
print(''.join(ans))


kMap = 'qwertyuiopasdfghjkl;zxcvbnm,./'

def getActual(k, d):
	i = -1
	if d == 'L':
		i = 1
	return kMap[kMap.find(k) + i]
d = input()
s = input()
output = ''
for c in s:
	output += getActual(c, d)
print(output)


import math
import os
import random
import re
from sys import stdin, stdout
from collections import Counter
from itertools import permutations

def si():
	return str(stdin.readline())

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())

def debug(x):
	return stdout.write(str(x))
arr = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
rightdict = {}
leftdict = {}
for i in range(len(arr)):
	rightdict[arr[i]] = arr[i - 1]
for i in range(len(arr) - 1):
	leftdict[arr[i]] = arr[i + 1]
t = input()
s = si()
ansr = []
ansl = []
if t == 'R':
	for j in range(len(s)):
		for i in rightdict:
			if s[j] == i:
				ansr.append(rightdict[i])
	print(''.join((str(e) for e in ansr)))
if t == 'L':
	for j in range(len(s)):
		for i in leftdict:
			if s[j] == i:
				ansl.append(leftdict[i])
	print(''.join((str(e) for e in ansl)))


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline().strip())
s = get_string()
inp = get_string()
d = {}
matrix = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
for string in matrix:
	d[string[0]] = [string[1]]
	d[string[-1]] = [string[-2]]
	for j in range(1, 9):
		d[string[j]] = [string[j - 1], string[j + 1]]
res = ''
if s == 'R':
	for i in inp:
		res += d[i][0]
else:
	for i in inp:
		res += d[i][-1]
print(res)


direction = input()
sentence = input()

def getCharFromKeyboard(c):
	i = 0
	flag = True
	while i < len(keyboard_matrix) and flag:
		j = 0
		while j < len(keyboard_matrix[i]) and flag:
			if keyboard_matrix[i][j] == c:
				flag = False
			if flag:
				j += 1
		if flag:
			i += 1
	return [i, j]
keyboard_matrix = [list('qwertyuiop'), list('asdfghjkl;'), list('zxcvbnm,./')]
mark = (1, 3)
turn = None
if direction == 'R':
	turn = -1
else:
	turn = 1
sentence = list(sentence)
for i in range(len(sentence)):
	res = getCharFromKeyboard(sentence[i])
	res[1] += turn
	sentence[i] = keyboard_matrix[res[0]][res[1]]
sentence = ''.join(sentence)
print(sentence)


def pos(c, layout):
	p = 0
	size = len(layout)
	for i in range(size):
		if layout[i] == c:
			p = i
			break
	return p

def main():
	ch = input()
	s = input()
	ans = ''
	layout = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	n = len(s)
	if ch == 'R':
		for i in range(n):
			if s[i] == 'q' or s[i] == 'a' or s[i] == 'z':
				ans = ans + s[i]
			else:
				temp = pos(s[i], layout)
				ans = ans + layout[temp - 1]
	elif ch == 'L':
		for i in range(n):
			if s[i] == 'p' or s[i] == ';' or s[i] == ';':
				ans = ans + s[i]
			else:
				temp = pos(s[i], layout)
				ans = ans + layout[temp + 1]
	print(ans)
main()


a = input()
b = input()
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = []
for i in range(len(b)):
	x = c.index(b[i])
	if a == 'R':
		if b[i] == 'q' or b[i] == 'a' or b[i] == 'z':
			d.append(b[i])
		else:
			d.append(c[x - 1])
	elif b[i] == 'p' or b[i] == ';' or b[i] == '/':
		d.append(b[i])
	else:
		d.append(c[x + 1])
print(*d, sep='')


def shift(sequence, shift):
	keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	keyboardList = list(keyboard)
	sentence = ''
	if shift == 'R':
		for i in sequence:
			sentence += keyboardList[keyboardList.index(i) - 1]
		return sentence
	for i in sequence:
		sentence += keyboardList[keyboardList.index(i) + 1]
	return sentence
direction = str(input())
sequence = str(input())
print(shift(sequence, direction))


K = 'qwertyuiopasdfghjkl;zxcvbnm,./'
P = {}
for i in range(len(K)):
	P[K[i]] = i
dir = input().strip()
a = input().strip()
if dir == 'R':
	dir = -1
else:
	dir = +1
b = ''
for c in a:
	b += K[P[c] + dir]
print(b)


p = input()
s = input()
a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
i = 0
out = ''
if p == 'R':
	while i < len(s):
		if s[i] in a:
			x = a.find(s[i])
			out = out + a[x - 1]
			i += 1
		elif s[i] in b:
			x = b.find(s[i])
			out = out + b[x - 1]
			i += 1
		else:
			x = c.find(s[i])
			out = out + c[x - 1]
			i += 1
else:
	while i < len(s):
		if s[i] in a:
			x = a.find(s[i])
			out = out + a[x + 1]
			i += 1
		elif s[i] in b:
			x = b.find(s[i])
			out = out + b[x + 1]
			i += 1
		else:
			x = c.find(s[i])
			out = out + c[x + 1]
			i += 1
print(out)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
w = input()
inf = input()
for i in inf:
	if w == 'R':
		print(s[s.index(i) - 1], end='')
	else:
		print(s[s.index(i) + 1], end='')


l = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
s1 = input()
s2 = input()
(l1, l2) = ([], [])
for i in s2:
	l1.append(i)
for i in l1:
	z = l.index(i)
	if s1 == 'R':
		l2.append(l[z - 1])
	elif s1 == 'L':
		l2.append(l[z + 1])
print(''.join(l2))


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
keys = []
for x in keyboard:
	keys.append(x)
shifting = input()
message = input()
if shifting == 'L':
	shift = 1
else:
	shift = -1
letters = []
for x in message:
	letters.append(keys[keys.index(x) + shift])
message = ''
for x in letters:
	message += x
print(message)


a = input()
b = input()
line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
final = ''
if a == 'R':
	for ch in b:
		if ch in line1:
			ch = line1[line1.find(ch) - 1]
		elif ch in line2:
			ch = line2[line2.find(ch) - 1]
		elif ch in line3:
			ch = line3[line3.find(ch) - 1]
		final += ch
elif a == 'L':
	for ch in b:
		if ch in line1:
			ch = line1[line1.find(ch) + 1]
		elif ch in line2:
			ch = line2[line2.find(ch) + 1]
		elif ch in line3:
			ch = line3[line3.find(ch) + 1]
		final += ch
print(final)


d = input()
S = input()
f = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
f1 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
f2 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
ans = ''
if d == 'R':
	for i in S:
		if i in f:
			ind = f.index(i)
			ans += f[ind - 1]
		elif i in f1:
			ind = f1.index(i)
			ans += f1[ind - 1]
		else:
			ind = f2.index(i)
			ans += f2[ind - 1]
elif d == 'L':
	for i in S:
		if i in f:
			ind = f.index(i)
			ans += f[ind + 1]
		elif i in f1:
			ind = f1.index(i)
			ans += f1[ind + 1]
		else:
			ind = f2.index(i)
			ans += f2[ind + 1]
print(ans)


dest = input()
s = input()
s_new = ''
dic = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if dest == 'R':
	for i in s:
		s_new += dic[dic.index(i) - 1]
else:
	for i in s:
		s_new += dic[dic.index(i) + 1]
print(s_new)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = {'L': 1, 'R': -1}[input()]
text = input()
print(''.join((keyboard[keyboard.find(ch) + shift] for ch in text)))


k = list('qwertyuiopasdfghjkl;zxcvbnm,./')
lnk = len(k)
op = input()
x = list(input())
lnx = len(x)
if op == 'R':
	y = -1
else:
	y = 1
for i in range(lnx):
	for j in range(lnk):
		if x[i] == k[j]:
			x[i] = k[j + y]
			break
x = ''.join(x)
print(x)


d = input()
s1 = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
list1 = []
if d == 'R':
	for i in s1:
		list1.append(s[s.index(i) - 1])
else:
	for i in s1:
		list1.append(s[s.index(i) + 1])
print(''.join(list1))


l = list('qwertyuiopasdfghjkl;zxcvbnm,./')
direction = input()
message = ''
shift = -1 if direction == 'R' else 1
s = list(input())
for i in range(len(s)):
	message += l[l.index(s[i]) + shift]
print(message)


direction = input()
s = list(input())
first_row = list('qwertyuiop')
second_row = list('asdfghjkl;')
third_row = list('zxcvbnm,./')
updated = []
for i in s:
	if i in first_row:
		temp = first_row.index(i)
		if direction == 'R':
			new_temp = temp - 1
			updated.append(first_row[new_temp])
		else:
			new_temp = temp + 1
			updated.append(first_row[new_temp])
	elif i in second_row:
		temp = second_row.index(i)
		if direction == 'R':
			new_temp = temp - 1
			updated.append(second_row[new_temp])
		else:
			new_temp = temp + 1
			updated.append(second_row[new_temp])
	elif i in third_row:
		temp = third_row.index(i)
		if direction == 'R':
			new_temp = temp - 1
			updated.append(third_row[new_temp])
		else:
			new_temp = temp + 1
			updated.append(third_row[new_temp])
print(''.join(updated))


vocab = list('qwertyuiopasdfghjkl;zxcvbnm,./')
direction = input()
message = list(input())
to_p = ''
if direction == 'R':
	for e in message:
		to_p += vocab[vocab.index(e) - 1]
if direction == 'L':
	for e in message:
		to_p += vocab[vocab.index(e) + 1]
print(to_p.strip())


l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
s = input()
t = input()
c = []
for i in range(len(t)):
	for j in range(len(l1)):
		if l1[j] == t[i]:
			if s == 'R':
				c.append(l1[j - 1])
			else:
				c.append(l1[j + 1])
		if l2[j] == t[i]:
			if s == 'R':
				c.append(l2[j - 1])
			else:
				c.append(l2[j + 1])
		if l3[j] == t[i]:
			if s == 'R':
				c.append(l3[j - 1])
			else:
				c.append(l3[j + 1])
for i in range(len(c)):
	if c[i] != 1:
		print(c[i], end='')


direction = input()
mole = input()
first = list('qwertyuiop')
second = list('asdfghjkl;')
third = list('zxcvbnm,./')
correct = []
if direction == 'R':
	for i in mole:
		if i in first:
			if first.index(i) == 0:
				correct.append(first[0])
			else:
				correct.append(first[first.index(i) - 1])
		if i in second:
			if second.index(i) == 0:
				correct.append(second[0])
			else:
				correct.append(second[second.index(i) - 1])
		if i in third:
			if third.index(i) == 0:
				correct.append(third[0])
			else:
				correct.append(third[third.index(i) - 1])
else:
	for i in mole:
		if i in first:
			if first.index(i) == 9:
				correct.append(first[9])
			else:
				correct.append(first[first.index(i) + 1])
		if i in second:
			if second.index(i) == 9:
				correct.append(second[9])
			else:
				correct.append(second[second.index(i) + 1])
		if i in third:
			if third.index(i) == 9:
				correct.append(third[9])
			else:
				correct.append(third[third.index(i) + 1])
print(''.join(correct))


c = input()
s = input()
a = ('qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./')
left = {}
right = {}
for w in a:
	for i in range(len(w)):
		if i > 0:
			left[w[i]] = w[i - 1]
		if i < len(w) - 1:
			right[w[i]] = w[i + 1]
ans = ''
for ch in s:
	if c == 'L':
		ans = ans + right[ch]
	else:
		ans = ans + left[ch]
print(ans)


n = input()
k = [x for x in input()]
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = [i for i in s]
w = int(len(k))
if n == 'L':
	for i in range(w):
		m = l.index(k[i])
		k[i] = l[m + 1]
else:
	for i in range(w):
		m = l.index(k[i])
		k[i] = l[m - 1]
print(''.join(k))


import sys
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
right = 'pqwertyuio;asdfghjkl/zxcvbnm,.'
left = 'wertyuiopqsdfghjkl;axcvbnm,./z'

def decrypt(shift, message):
	table = str.maketrans(keyboard, right if shift == 'R' else left)
	message = message.translate(table)
	return message
input = sys.stdin.read()
(shift, message) = input.split()
print(decrypt(shift, message))


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
dire = str(input())
string = str(input())
s = ''
for i in range(len(string)):
	if string[i] in a:
		ind = a.index(string[i])
		if dire == 'R':
			if ind == 0 or ind == len(a):
				s += a[ind]
			s += a[ind - 1]
		else:
			s += a[ind + 1]
	elif string[i] in b:
		ind = b.index(string[i])
		if dire == 'R':
			if ind == 0 or ind == len(b):
				s += b[ind]
			s += b[ind - 1]
		else:
			s += b[ind + 1]
	elif string[i] in c:
		ind = c.index(string[i])
		if dire == 'R':
			if ind == 0 or ind == len(c):
				s += c[ind]
			s += c[ind - 1]
		else:
			s += c[ind + 1]
print(s)


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
s = input()
b = ''
idx = 0
if x == 'R':
	for i in s:
		idx = a.find(i)
		b = b + a[idx - 1]
else:
	for i in s:
		idx = a.find(i)
		b = b + a[idx + 1]
print(b)


x = 'qwertyuiop'
y = 'asdfghjkl;'
z = 'zxcvbnm,./'
f = input()
s = input()
for i in s:
	if i in x:
		if f == 'R':
			print(x[x.index(i) - 1], end='')
		else:
			print(x[x.index(i) + 1], end='')
	if i in y:
		if f == 'R':
			print(y[y.index(i) - 1], end='')
		else:
			print(y[y.index(i) + 1], end='')
	if i in z:
		if f == 'R':
			print(z[z.index(i) - 1], end='')
		else:
			print(z[z.index(i) + 1], end='')


n = input()
a = input()
b = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = str()
for i in range(len(a)):
	if n == 'R':
		c = c + b[b.find(a[i]) - 1]
	else:
		c = c + b[b.find(a[i]) + 1]
print(c)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s1 = input()
s2 = input()
s3 = ''
if s1 == 'R':
	for i in range(len(s2)):
		for j in range(len(s)):
			if s[j] == s2[i]:
				s3 += s[j - 1]
				break
else:
	for i in range(len(s2)):
		for j in range(len(s)):
			if s[j] == s2[i]:
				s3 += s[j + 1]
				break
print(s3)


line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
keyboard = [line1, line2, line3]
shift = [1, -1][input() == 'R']
r = ''
for x in input():
	for line in keyboard:
		if x in line:
			r += line[line.index(x) + shift]
print(r)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
d = input()
e = input()
s = ''
if d == 'R':
	for i in e:
		if i in a:
			s += a[a.index(i) - 1]
		elif i in b:
			s += b[b.index(i) - 1]
		elif i in c:
			s += c[c.index(i) - 1]
elif d == 'L':
	for i in e:
		if i in a:
			s += a[a.index(i) + 1]
		elif i in b:
			s += b[b.index(i) + 1]
		elif i in c:
			s += c[c.index(i) + 1]
print(s)


qwer = 'qwertyuiopasdfghjkl;zxcvbnm,./'
s = str(input())
st = str(input())
for i in range(len(st)):
	if s == 'R':
		print(qwer[qwer.index(st[i]) - 1], end='')
	else:
		print(qwer[qwer.index(st[i]) + 1], end='')


string = 'qwertyuiop asdfghjkl; zxcvbnm,./'
strToIdx = {}
for (i, c) in enumerate(string):
	strToIdx[c] = i
if input() == 'R':
	shift = -1
else:
	shift = 1
message = input()
for c in message:
	idx = strToIdx[c]
	print(string[idx + shift], end='')
print()


A = 'qwertyuiop'
B = 'asdfghjkl;'
C = 'zxcvbnm,./'
l = input()
s = input()
if l == 'R':
	for ch in s:
		if ch in A:
			print(A[A.index(ch) - 1], end='')
		elif ch in B:
			print(B[B.index(ch) - 1], end='')
		else:
			print(C[C.index(ch) - 1], end='')
else:
	for ch in s:
		if ch in A:
			print(A[A.index(ch) + 1], end='')
		elif ch in B:
			print(B[B.index(ch) + 1], end='')
		else:
			print(C[C.index(ch) + 1], end='')


a = input()
b = str(input())
c = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'", 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
temp = 0
if a == 'L':
	temp = temp + 1
else:
	temp = temp - 1
for i in b:
	d = c.index(i)
	print(c[d + temp], end='')


key = [['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';'], ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']]

def findx(n):
	for i in range(3):
		for j in range(10):
			if key[i][j] == n:
				return i

def findy(n):
	for i in range(3):
		for j in range(10):
			if key[i][j] == n:
				return j
order = input()
line = input()
new = []
for i in range(len(line)):
	x = int(findx(line[i]))
	y = int(findy(line[i]))
	if order == 'L':
		n = key[x][y + 1]
	else:
		n = key[x][y - 1]
	new.append(n)
print(''.join(new))


dir = input()
key = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
inp = input()
final = ''
if dir == 'R':
	for i in inp:
		if i in key[0]:
			loc = key[0].find(i)
			final += key[0][loc - 1]
		elif i in key[1]:
			loc = key[1].find(i)
			final += key[1][loc - 1]
		elif i in key[2]:
			loc = key[2].find(i)
			final += key[2][loc - 1]
else:
	for i in inp:
		if i in key[0]:
			loc = key[0].find(i)
			final += key[0][loc + 1]
		elif i in key[1]:
			loc = key[1].find(i)
			final += key[1][loc + 1]
		elif i in key[2]:
			loc = key[2].find(i)
			final += key[2][loc + 1]
print(final)


l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
s = input()
if d == 'L':
	for i in range(len(s)):
		for j in range(len(l)):
			if s[i] == l[j]:
				print(l[j + 1], end='')
				break
else:
	for i in range(len(s)):
		for j in range(len(l)):
			if s[i] == l[j]:
				print(l[j - 1], end='')
				break


dir = input()
s = input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if dir == 'R':
	for l in s:
		print(key[key.index(l) - 1], end='')
else:
	for l in s:
		print(key[key.index(l) + 1], end='')


LRcheck = input()
if LRcheck == 'R':
	adjuster = -1
else:
	adjuster = 1
keyBoard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
typing = input()
message = ''
for letter in typing:
	for item in keyBoard:
		i = 0
		while i < len(item):
			if letter == item[i]:
				try:
					message += item[i + adjuster]
				except:
					pass
			i += 1
print(message)


direction = input()
strToCheck = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
newStr = ''
newPosition = -1
if direction == 'L':
	newPosition = 1

def find(c, str):
	for i in range(len(str)):
		if str[i] == c:
			return i
for i in range(len(strToCheck)):
	newStr += keyboard[find(strToCheck[i], keyboard) + newPosition]
print(newStr)


s1 = list('qwertyuiop')
s2 = list('asdfghjkl;')
s3 = list('zxcvbnm,./')
s = s1 + s2 + s3
move = input()
string = input()
if move == 'R':
	for i in string:
		ind = s.index(str(i))
		print(s[ind - 1], end='')
elif move == 'L':
	for i in string:
		ind = s.index(str(i))
		print(s[ind + 1], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = input()
S = input()
D = -1
if d == 'L':
	D = 1
mp = dict()
for i in range(len(a)):
	mp[a[i]] = i
res = ''
for x in S:
	res += a[mp[x] + D]
print(res)


l = input()
s = input()
l1 = []
s1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if l == 'R':
	for each in s:
		n = s1.index(each)
		l1.append(s1[n - 1])
else:
	for each in s:
		n = s1.index(each)
		l1.append(s1[n + 1])
x = ''.join(l1)
print(x)


b = input()
s = input()
z = ''
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(s)):
	if b == 'R':
		print(l[l.index(s[i]) - 1], end='')
	if b == 'L':
		z = l[l.index(s[i]) + 1]
		print(z, end='')


def getOriginalCharacter(ch, shift):
	arrangement = 'qwertyuiop asdfghjkl; zxcvbnm,./'
	position = arrangement.index(ch)
	if shift == 'L':
		return arrangement[position + 1]
	return arrangement[position - 1]
shift = input()
mssg = input()

def correctMessage(mssg, shift):
	return ''.join([getOriginalCharacter(ch, shift) for ch in mssg])
print(correctMessage(mssg, shift))


def generate_dict(dir):
	s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	o = 1 if dir == 'L' else -1
	d = {}
	for i in range(len(s)):
		try:
			d[s[i]] = s[i + o]
		except IndexError:
			pass
	return d
d = generate_dict(input())
s = ''
for ch in input():
	s += d[ch]
print(s)


b = input()
a = list(input())
c = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = -1 if b == 'R' else 1
i = 0
while i < len(a):
	a[i] = c[c.find(a[i]) + d]
	i += 1
print(''.join(a))


l1 = 'qwertyuiop'
l2 = 'asdfghjkl;'
l3 = 'zxcvbnm,./'
t = input()
st = input()
for i in range(len(st)):
	shift = -1 if t == 'R' else 1
	if st[i] in l1:
		print(l1[l1.index(st[i]) + shift], end='')
	elif st[i] in l2:
		print(l2[l2.index(st[i]) + shift], end='')
	elif st[i] in l3:
		print(l3[l3.index(st[i]) + shift], end='')


n = input()
z = input()
q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k = []
if n == 'R':
	for i in z:
		k.append(q[q.find(i) - 1])
elif n == 'L':
	for i in z:
		k.append(q[q.find(i) + 1])
print(''.join([str(i) for i in k]))


keyboard = ' qwertyuiopasdfghjkl;zxcvbnm,./'
Dict = {}
for i in range(31):
	Dict[keyboard[i]] = i
	Dict[i] = keyboard[i]
L_or_R = input()
message = input()
if L_or_R == 'L':
	for char in message:
		print(Dict[Dict[char] + 1], end='')
else:
	for char in message:
		print(Dict[Dict[char] - 1], end='')


orien = str(input().strip())
keyboard = 'qwertyuiop\nasdfghjkl;\nzxcvbnm,./'
word = str(input())
for w in word:
	if orien == 'R':
		print(keyboard[keyboard.index(w) - 1], end='')
	else:
		print(keyboard[keyboard.index(w) + 1], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
text = input()
if direction == 'R':
	mv = -1
else:
	mv = 1
print(''.join([s[s.index(c) + mv] for c in text]))


t = input()
(a, s) = ('qwertyuiopasdfghjkl;zxcvbnm,./', input())
ans = ''
for i in range(len(s)):
	if t == 'R':
		ans += a[a.index(s[i]) - 1]
	else:
		ans += a[a.index(s[i]) + 1]
print(ans)


s1 = '0qwertyuiopasdfghjkl;zxcvbnm,./0'
s = input().rstrip()
d = 1
if s == 'R':
	d = -1
g = dict()
for i in range(1, len(s1) - 1):
	g[s1[i]] = s1[i + d]
s = list(input().rstrip())
s1 = ''
for i in s:
	s1 += g[i]
print(s1)


d = input()
s = input()
k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in s:
	a = k.index(i)
	if d == 'R':
		print(k[a - 1], end='')
	else:
		print(k[a + 1], end='')


d = input()
s = input()
kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
adjust = 1 if d == 'L' else -1
dict_kb = {}
for (i, c) in enumerate(kb):
	dict_kb[c] = i + adjust
out = ''
for c in s:
	out += kb[dict_kb[c]]
print(out)


key_board = 'qwertyuiopasdfghjkl;zxcvbnm,./'
bug = input()
ir_massage = input()
cor_massage = []
for i in ir_massage:
	if bug == 'R':
		i = key_board[key_board.find(i) - 1]
		cor_massage.append(i)
	elif bug == 'L':
		i = key_board[key_board.find(i) + 1]
		cor_massage.append(i)
print(''.join(cor_massage))


layout = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
strText = input()
out = ''
if direction == 'L':
	for i in strText:
		out += layout[layout.index(i) + 1]
elif direction == 'R':
	for i in strText:
		out += layout[layout.index(i) - 1]
print(out)


hands = str(input())
message = str(input())
firstrow = 'qwertyuiop'
secondrow = 'asdfghjkl;'
thirdrow = 'zxcvbnm,./'
RDict = {}
LDict = {}
for i in range(len(firstrow) - 1):
	RDict[firstrow[i]] = firstrow[i + 1]
for i in range(len(secondrow) - 1):
	RDict[secondrow[i]] = secondrow[i + 1]
for i in range(len(thirdrow) - 1):
	RDict[thirdrow[i]] = thirdrow[i + 1]
for i in range(1, len(firstrow)):
	LDict[firstrow[i]] = firstrow[i - 1]
for i in range(1, len(secondrow)):
	LDict[secondrow[i]] = secondrow[i - 1]
for i in range(1, len(thirdrow)):
	LDict[thirdrow[i]] = thirdrow[i - 1]
answer = ''
if hands == 'L':
	for char in message:
		answer += RDict[char]
else:
	for char in message:
		answer += LDict[char]
print(answer)


kb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
w = input()
line = input()
op = [kb[kb.index(i) + [-1, 1][w == 'L']] for i in line]
print(''.join(op))


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
print(''.join([keyboard[keyboard.find(i) - 1] for i in input()] if input() == 'R' else [keyboard[keyboard.find(i) + 1] for i in input()]))


alphabet = {value: key for (key, value) in enumerate('qwertyuiopasdfghjkl;zxcvbnm,./')}
alphabet.update({key: value for (key, value) in enumerate('qwertyuiopasdfghjkl;zxcvbnm,./')})
(letter, string) = (input(), input())
res = ''
for ch in string:
	if letter == 'L':
		res += alphabet[alphabet[ch] + 1]
	else:
		res += alphabet[alphabet[ch] - 1]
print(res)


a = input()
b = input()
c = []
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'L':
	offset = 1
else:
	offset = -1
for x in b:
	c.append(keyboard[keyboard.index(x) + offset])
print(''.join((str(x) for x in c)))


shift = input()
s = input()
string = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if shift == 'R':
	for i in s:
		for j in range(len(string)):
			if string[j] == i:
				print(string[j - 1], end='')
else:
	for i in s:
		for j in range(len(string)):
			if string[j] == i:
				print(string[j + 1], end='')


key = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
direct = str(input())
mole = str(input())
for i in mole:
	for j in range(len(key)):
		if i == key[j] and direct == 'R':
			print(key[j - 1], end='')
		if i == key[j] and direct == 'L':
			print(key[j + 1], end='')


arr = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input().strip()
s = input().strip()
ans = ''
if x == 'R':
	for i in s:
		ans += arr[arr.index(i) - 1]
	print(ans)
else:
	for i in s:
		ans += arr[arr.index(i) + 1]
	print(ans)


keyboard = list('qwertyuiopasdfghjkl;zxcvbnm,./')
pos = -1 if input() == 'R' else 1
for i in input():
	print(keyboard[keyboard.index(i) + pos], end='')


inp = input()
s = input()
re = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if inp == 'R':
	for i in s:
		ans = ans + re[re.index(i) - 1]
else:
	for i in s:
		ans = ans + re[re.index(i) + 1]
print(ans)


s = input()
p = input()
p1 = 'qwertyuiop'
p2 = 'asdfghjkl;'
p3 = 'zxcvbnm,./'
if s == 'R':
	for i in p:
		if i in p1:
			a = p1.index(i)
			print(p1[a - 1], end='')
		elif i in p2:
			a = p2.index(i)
			print(p2[a - 1], end='')
		elif i in p3:
			a = p3.index(i)
			print(p3[a - 1], end='')
if s == 'L':
	for i in p:
		if i in p1:
			a = p1.index(i)
			print(p1[a + 1], end='')
		elif i in p2:
			a = p2.index(i)
			print(p2[a + 1], end='')
		elif i in p3:
			a = p3.index(i)
			print(p3[a + 1], end='')


keyboard_map = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
string = input()
result_str = []
for char in string:
	result_str.append(keyboard_map[keyboard_map.index(char) + (-1 if shift == 'R' else 1)])
print(''.join(result_str))


import sys
input = sys.stdin.readline
brd = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input().strip()
text = input().strip()
if shift == 'L':
	[print(brd[brd.index(text[i]) + 1], end='') for i in range(len(text))]
else:
	[print(brd[brd.index(text[i]) - 1], end='') for i in range(len(text))]


from sys import stdin, stdout
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shifting = input()
if shifting == 'R':
	move = -1
else:
	move = 1
message = input()
for i in message:
	index = keyboard.index(i)
	print(keyboard[index + move], end='')
print()


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = [dict(zip(a, a[1:])), dict(zip(a[1:], a))]
b = [0, 1][input() == 'R']
r = ''
for x in input():
	r += d[b][x]
print(r)


side = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
place = 0
if side == 'R':
	str1 = input()
	for i in str1:
		place = keyboard.find(i)
		ans += keyboard[place - 1]
if side == 'L':
	str1 = input()
	for i in str1:
		place = keyboard.find(i)
		ans += keyboard[place + 1]
print(ans)


d = input()
word = list(input())
chars = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in word:
	if d == 'R':
		index = chars.find(i) - 1
		print(chars[index], end='')
	else:
		index = chars.find(i) + 1
		print(chars[index], end='')


f = str(input())
a = str(input())
s = ''
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
a = list(a)
s1 = list(s1)
s2 = list(s2)
s3 = list(s3)
if f == 'R':
	for i in range(len(a)):
		if s1.count(a[i]) > 0:
			m = s1.index(a[i])
			s = s + s1[m - 1]
		if s2.count(a[i]) > 0:
			m = s2.index(a[i])
			s = s + s2[m - 1]
		if s3.count(a[i]) > 0:
			m = s3.index(a[i])
			s = s + s3[m - 1]
if f == 'L':
	for i in range(len(a)):
		if s1.count(a[i]) > 0:
			m = s1.index(a[i])
			s = s + s1[m + 1]
		if s2.count(a[i]) > 0:
			m = s2.index(a[i])
			s = s + s2[m + 1]
		if s3.count(a[i]) > 0:
			m = s3.index(a[i])
			s = s + s3[m + 1]
print(s)


x = input()
st1 = input()
st = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if x == 'R':
	for i in range(len(st1)):
		a = st.index(st1[i])
		print(st[a - 1], end='')
else:
	for i in range(len(st1)):
		a = st.index(st1[i])
		print(st[a + 1], end='')


d = input()
txt = input()
if d == 'R':
	d = 'L'
else:
	d = 'R'
hashMap = {'Rq': 'w', 'Rw': 'e', 'Re': 'r', 'Rr': 't', 'Rt': 'y', 'Ry': 'u', 'Ru': 'i', 'Ri': 'o', 'Ro': 'p', 'Rp': '[', 'Lq': '', 'Lw': 'q', 'Le': 'w', 'Lr': 'e', 'Lt': 'r', 'Ly': 't', 'Lu': 'y', 'Li': 'u', 'Lo': 'i', 'Lp': 'o', 'Ra': 's', 'Rs': 'd', 'Rd': 'f', 'Rf': 'g', 'Rg': 'h', 'Rh': 'j', 'Rj': 'k', 'Rk': 'l', 'Rl': ';', 'R;': "'", 'La': '', 'Ls': 'a', 'Ld': 's', 'Lf': 'd', 'Lg': 'f', 'Lh': 'g', 'Lj': 'h', 'Lk': 'j', 'Ll': 'k', 'L;': 'l', 'Rz': 'x', 'Rx': 'c', 'Rc': 'v', 'Rv': 'b', 'Rb': 'n', 'Rn': 'm', 'Rm': ',', 'R,': '.', 'R.': '/', 'R/': '', 'Lz': '', 'Lx': 'z', 'Lc': 'x', 'Lv': 'c', 'Lb': 'v', 'Ln': 'b', 'Lm': 'n', 'L,': 'm', 'L.': ',', 'L/': '.'}
ans = ''
for c in txt:
	ans += hashMap[d + c]
print(ans)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
y = ''
if x[0] == 'R':
	for i in input():
		y += keyboard[keyboard.index(i) - 1]
else:
	for i in input():
		y += keyboard[keyboard.index(i) + 1]
print(y)


d = 1 - 2 * (input() == 'R')
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
print(*[s[s.index(c) + d] for c in input()], sep='')


x = input()
y = input()
a = 'qwertyuiop' + 'asdfghjkl;' + 'zxcvbnm,./'
if x == 'R':
	for i in range(len(y)):
		t = a.index(y[i])
		print(a[t - 1], end='')
if x == 'L':
	for i in range(len(y)):
		t = a.index(y[i])
		print(a[t + 1], end='')


char = input()
message = input()
a = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
result = []
if char == 'R':
	for (index, value) in enumerate(message):
		i = a.index(value)
		result.append(a[i - 1])
elif char == 'L':
	for (index, value) in enumerate(message):
		i = a.index(value)
		result.append(a[i + 1])
print(''.join(result))


check = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = input()
b = input()
if a == 'L':
	count = -1
else:
	count = 1
result = ''
for i in b:
	result += check[check.index(i) - count]
print(result)


s = str(input())
s1 = str(input())
st = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(s1)):
	n = st.index(s1[i])
	if s == 'R':
		print(str(st[n - 1]), end='')
	if s == 'L':
		print(str(st[n + 1]), end='')


o = 'qwertyuiopasdfghjkl;zxcvbnm,./'
r = "wertyuiop[sdfghjkl;'xcvbnm,./ "
l = ' qwertyuio asdfghjkl zxcvbnm,.'
d = input()
s = input()
v = ''
if d == 'R':
	h = r
else:
	h = l
for i in range(len(s)):
	k = s[i]
	n = h.find(k)
	if n < 0:
		v = v + k
	else:
		v = v + o[n]
print(v)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
for i in input():
	print(s[s.index(i) + [1, -1][shift == 'R']], end='')


he = input()
li = input()
length = len(li)
correct = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
a = []
b = []
if he == 'R':
	for i in range(length):
		a.append(correct[correct.index(li[i]) - 1])
if he == 'L':
	for i in range(length):
		a.append(correct[correct.index(li[i]) + 1])
print(''.join(a))


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
p = input()
x = list(input())
d = []
if p == 'R':
	for i in x:
		if i in a:
			d.append(a[a.index(i) - 1])
		elif i in b:
			d.append(b[b.index(i) - 1])
		else:
			d.append(c[c.index(i) - 1])
else:
	for i in x:
		if i in a:
			d.append(a[a.index(i) + 1])
		elif i in b:
			d.append(b[b.index(i) + 1])
		else:
			d.append(c[c.index(i) + 1])
d = ''.join(d)
print(d)


A = list('qwertyuiop')
B = list('asdfghjkl;')
C = list('zxcvbnm,./')
n = input()
lis = [str(i) for i in input()]
if n == 'R':
	for i in range(len(lis)):
		if lis[i] in A:
			lis[i] = A[A.index(lis[i]) - 1]
		elif lis[i] in B:
			lis[i] = B[B.index(lis[i]) - 1]
		elif lis[i] in C:
			lis[i] = C[C.index(lis[i]) - 1]
elif n == 'L':
	for i in range(len(lis)):
		if lis[i] in A:
			lis[i] = A[A.index(lis[i]) + 1]
		elif lis[i] in B:
			lis[i] = B[B.index(lis[i]) + 1]
		elif lis[i] in C:
			lis[i] = C[C.index(lis[i]) + 1]
print(''.join(lis))


op = input().upper()
s = input()
sr = 'qwertyuiopasdfghjkl;zxcvbnm,./'
k = ''
if op == 'R':
	for i in s:
		ind = sr.index(i)
		k = k + sr[ind - 1]
	print(k)
else:
	for i in s:
		ind = sr.index(i)
		k = k + sr[ind + 1]
	print(k)


key = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
s1 = input()
s2 = input()
ans = ''
for i in s2:
	for j in range(3):
		for k in range(10):
			if s1 == 'R' and i == key[j][k]:
				ans += key[j][k - 1]
			elif s1 == 'L' and i == key[j][k]:
				ans += key[j][k + 1]
print(ans)


check = input()
st = input()
st1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
res = ''
if check == 'R':
	for i in st:
		res = res + st1[st1.index(i) - 1]
else:
	for i in st:
		res = res + st1[st1.index(i) + 1]
print(res)


(shift, key_input) = (input(), input())
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
key_order = []
new_string = []
if shift == 'R':
	shift = -1
else:
	shift = 1
for i in key_input:
	key_order.append(keyboard.find(i) + shift)
for i in key_order:
	new_string.append(keyboard[i])
print(''.join(new_string))


x = 'qwertyuiopasdfghjkl;zxcvbnm,./'

def R(a):
	print(x[x.index(a) - 1], end='')

def L(a):
	print(x[x.index(a) + 1], end='')

def main():
	mov = input()
	a = input()
	for i in range(len(a)):
		if mov == 'R':
			R(a[i])
		else:
			L(a[i])
main()


key = [['qwertyuiop'], ['asdfghjkl;'], ['zxcvbnm,./']]
index = {}
for i in range(3):
	for j in range(10):
		index[key[i][0][j]] = [i, j]
move = input()
s = input()
new_s = ''
if move == 'R':
	for i in s:
		pos = index[i]
		new_s += key[pos[0]][0][(pos[1] - 1) % 10]
else:
	for i in s:
		pos = index[i]
		new_s += key[pos[0]][0][(pos[1] + 1) % 10]
print(new_s)


a = input()
b = input()
d = ''
s = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
for i in b:
	if a == 'R':
		d += s[s.find(i) - 1]
	else:
		d += s[s.find(i) + 1]
print(d)


x = input()
y = input()
z = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if x == 'R':
	for i in range(0, len(y)):
		ind = z.find(y[i])
		print(z[ind - 1], end='')
else:
	for i in range(0, len(y)):
		ind = z.find(y[i])
		print(z[ind + 1], end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
offset = input()
s = input()
if offset == 'R':
	for i in range(len(s)):
		print(keyboard[keyboard.find(s[i]) - 1], sep='', end='')
else:
	for i in range(len(s)):
		print(keyboard[keyboard.find(s[i]) + 1], sep='', end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
lor = input()
str = input()
i = 0
while i < len(str):
	n = keyboard.index(str[i])
	if lor == 'L':
		print(keyboard[n + 1], end='')
	elif lor == 'R':
		print(keyboard[n - 1], end='')
	i += 1


import math
p = input()
if p == 'R':
	k = -1
else:
	k = 1
m = 'qwertyuiopasdfghjkl;zxcvbnm,./'
dd = len(m)
s = input()
ss = len(s)
r = []
for i in range(0, ss, 1):
	l = 0
	for j in range(0, dd, 1):
		if s[i] == m[j]:
			ll = j + k
			r.append(m[ll])
print(''.join([str(r[i]) for i in range(0, len(r))]))


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
st = input()
res = []
for char in st:
	if x == 'R':
		res.append(s[s.index(char) - 1])
	else:
		res.append(s[s.index(char) + 1])
print(''.join(res))


s = str(input())
a = str(input())
a = list(a)
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = list(l)
if s == 'R':
	for i in range(len(a)):
		ind = l.index(a[i])
		a[i] = l[ind - 1]
else:
	for i in range(len(a)):
		ind = l.index(a[i])
		a[i] = l[ind + 1]
print(''.join(a))


__author__ = 'Utena'
n = input()
m = input()
s = []
z = list('qwertyuiopasdfghjkl;zxcvbnm,./')
if n == 'R':
	for a in m:
		s.append(z[z.index(a) - 1])
	print(''.join(s))
elif n == 'L':
	for a in m:
		s.append(z[z.index(a) + 1])
	print(''.join(s))


s_1 = input()
s_2 = input()
keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if s_1 == 'R':
	for i in s_2:
		res = keyboard.find(i) - 1
		print(keyboard[res], end='')
else:
	for i in s_2:
		res = keyboard.find(i) + 1
		print(keyboard[res], end='')


a1 = list('qwertyuiop')
a2 = list('asdfghjkl;')
a3 = list('zxcvbnm,./')
n = input()
line = input()

def krot(j):
	line1 = []
	for i in line:
		if i in a1:
			line1.append(a1[a1.index(i) + j])
		if i in a2:
			line1.append(a2[a2.index(i) + j])
		if i in a3:
			line1.append(a3[a3.index(i) + j])
	return ''.join(line1)
if n == 'R':
	print(krot(-1))
elif n == 'L':
	print(krot(1))


s = input()
f = ''
sx = list(input())
l = list('qwertyuiopasdfghjkl;zxcvbnm,./')
for i in sx:
	if s == 'R':
		f += l[l.index(i) - 1]
	if s == 'L':
		f += l[l.index(i) + 1]
print(f)


omsg = 'qwertyuiopasdfghjkl;zxcvbnm,./'
shift = input()
inp = input()
if shift == 'R':
	for c in inp:
		print(omsg[omsg.find(c) - 1], end='')
else:
	for c in inp:
		print(omsg[omsg.find(c) + 1], end='')


d = -1 if input() == 'R' else 1
s = input()
keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
msg = ''
for ch in s:
	msg += keys[keys.index(ch) + d]
print(msg)


n = 1 if input() == 'L' else -1
a = []
a.append(list('qwertyuiop'))
a.append(list('asdfghjkl;'))
a.append(list('zxcvbnm,./'))
for i in list(input()):
	if i in a[0]:
		wk1 = 0
	if i in a[1]:
		wk1 = 1
	if i in a[2]:
		wk1 = 2
	print(a[wk1][a[wk1].index(i) + n], end='')
print()


klava = [list('qwertyuiop'), list('asdfghjkl;'), list('zxcvbnm,./')]
if input() == 'R':
	for i in list(input()):
		if i in klava[0]:
			print(klava[0][klava[0].index(i) - 1], end='')
		elif i in klava[1]:
			print(klava[1][klava[1].index(i) - 1], end='')
		else:
			print(klava[2][klava[2].index(i) - 1], end='')
else:
	for i in list(input()):
		if i in klava[0]:
			print(klava[0][klava[0].index(i) + 1], end='')
		elif i in klava[1]:
			print(klava[1][klava[1].index(i) + 1], end='')
		else:
			print(klava[2][klava[2].index(i) + 1], end='')


def solve(c: str, s: str):
	keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	correct_word = ''
	if c == 'R':
		for char in s:
			correct_word += keyboard[keyboard.find(char) - 1]
	else:
		for char in s:
			correct_word += keyboard[keyboard.find(char) + 1]
	return correct_word

def main():
	shift = input()
	word = input()
	print(solve(shift, word))
main()


a = list()
a.append(str('qwertyuiop'))
a.append(str('asdfghjkl;'))
a.append(str('zxcvbnm,./'))
di = input()
s = input()
for x in s:
	for i in range(3):
		for j in range(10):
			if a[i][j] == x:
				if di == 'R':
					print(str(a[i][j - 1]), end='')
				else:
					print(str(a[i][j + 1]), end='')
print()


key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
p = input()
s = input()
if p == 'L':
	c = 1
else:
	c = -1
r = ''
for i in s:
	r += key[key.index(i) + c]
print(r)


from _operator import indexOf
d = {}
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
a = 1 if input() == 'L' else -1
i = input()
for c in i:
	if c in d:
		i = d[c]
	else:
		i = s.index(c)
		d[c] = i
	print(s[i + a], end='')


e = input()
w = input()
l = "qwertyuiop[]asdfghjkl;'zxcvbnm,./"
n = ''
if e == 'R':
	for let in w:
		for i in range(len(l)):
			if l[i] == let:
				n += l[i - 1]
else:
	for let in w:
		for i in range(len(l)):
			if l[i] == let:
				n += l[i + 1]
print(n)


first = 'qwertyuiop'
second = 'asdfghjkl;'
third = 'zxcvbnm,./'
shift = input()
string = input()
if shift == 'R':
	count = -1
else:
	count = 1
i = 0
while i < len(string):
	if string[i] in first:
		print(first[first.index(string[i]) + count], end='')
	elif string[i] in second:
		print(second[second.index(string[i]) + count], end='')
	else:
		print(third[third.index(string[i]) + count], end='')
	i += 1


import sys
input = lambda : sys.stdin.readline()

def Main():
	keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
	m = input().strip()
	s = input().strip()
	ns = ''
	for i in range(len(s)):
		for j in range(3):
			index = getIndex(keyboard[j], s[i])
			if index != -1:
				if m == 'R':
					ns += str(keyboard[j][index - 1])
				else:
					ns += str(keyboard[j][index + 1])
	print(ns)

def getIndex(string, char):
	index = -1
	for i in range(len(string)):
		if string[i] == char:
			index = i
	return index
Main()


direction = input()
string = [str(i) for i in input()]
line1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
line2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
line3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
information = ''
if direction == 'R':
	for i in string:
		if i in line1:
			information += line1[line1.index(i) - 1]
		if i in line2:
			information += line2[line2.index(i) - 1]
		if i in line3:
			information += line3[line3.index(i) - 1]
else:
	for i in string:
		if i in line1:
			information += line1[line1.index(i) + 1]
		if i in line2:
			information += line2[line2.index(i) + 1]
		if i in line3:
			information += line3[line3.index(i) + 1]
print(information)


import sys
letters = list('qwertyuiopasdfghjkl;zxcvbnm,./')
type_swift = str(input())
symbols = list(str(input()))
answer = ''
for symbol in symbols:
	index_value = letters.index(symbol)
	if type_swift == 'R':
		answer += letters[index_value - 1]
	else:
		answer += letters[index_value + 1]
print(answer)


sd = input()
s = input()
ans = []
r1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
r2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
r3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
if sd == 'R':
	for i in range(len(s)):
		if s[i] in r1:
			a = r1.index(s[i])
			ans.append(r1[a - 1])
		elif s[i] in r2:
			b = r2.index(s[i])
			ans.append(r2[b - 1])
		else:
			c = r3.index(s[i])
			ans.append(r3[c - 1])
else:
	for i in range(len(s)):
		if s[i] in r1:
			a = r1.index(s[i])
			ans.append(r1[a + 1])
		elif s[i] in r2:
			b = r2.index(s[i])
			ans.append(r2[b + 1])
		else:
			c = r3.index(s[i])
			ans.append(r3[c + 1])
ans = ''.join(ans)
print(ans)


import sys
input = sys.stdin.readlines()
shift = input[0].strip()
phrase = input[1].strip()
line1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\\']
line2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'"]
line3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
output = ''
if shift == 'L':
	for x in phrase:
		if x in line1:
			index = line1.index(x) + 1
			output += line1[index]
		elif x in line2:
			index = line2.index(x) + 1
			output += line2[index]
		elif x in line3:
			index = line3.index(x) + 1
			output += line3[index]
elif shift == 'R':
	for x in phrase:
		if x in line1:
			index = line1.index(x) - 1
			output += line1[index]
		elif x in line2:
			index = line2.index(x) - 1
			output += line2[index]
		elif x in line3:
			index = line3.index(x) - 1
			output += line3[index]
print(output)


L1 = 'qwertyuiop'
L2 = 'asdfghjkl;'
L3 = 'zxcvbnm,./'
Direction = input()
StringToConvert = [x for x in input()]
if Direction == 'R':
	for i in range(len(StringToConvert)):
		if StringToConvert[i] in L1:
			StringToConvert[i] = L1[L1.index(StringToConvert[i]) - 1]
		elif StringToConvert[i] in L2:
			StringToConvert[i] = L2[L2.index(StringToConvert[i]) - 1]
		else:
			StringToConvert[i] = L3[L3.index(StringToConvert[i]) - 1]
	print(''.join(StringToConvert))
else:
	for i in range(len(StringToConvert)):
		if StringToConvert[i] in L1:
			StringToConvert[i] = L1[L1.index(StringToConvert[i]) + 1]
		elif StringToConvert[i] in L2:
			StringToConvert[i] = L2[L2.index(StringToConvert[i]) + 1]
		else:
			StringToConvert[i] = L3[L3.index(StringToConvert[i]) + 1]
	print(''.join(StringToConvert))


move = input()
ans = ''
s = input()
keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
if move == 'R':
	for i in range(len(s)):
		for j in range(len(keyboard)):
			if s[i] in keyboard[j]:
				ans += keyboard[j][keyboard[j].index(s[i]) - 1]
elif move == 'L':
	for i in range(len(s)):
		for j in range(len(keyboard)):
			if s[i] in keyboard[j]:
				ans += keyboard[j][keyboard[j].index(s[i]) + 1]
print(ans)


n = input()
n1 = input()
w = ''
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in n1:
	if n == 'R':
		w = w + s[s.index(i) - 1]
	else:
		w = w + s[s.index(i) + 1]
print(w)


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
dirn = input()
word = input()
for i in word:
	if dirn == 'R':
		print(keys[keys.find(i) - 1], end='')
	else:
		print(keys[keys.find(i) + 1], end='')


def main():
	t = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	dd = input()
	ll = input()
	d = 0
	if dd == 'R':
		d = -1
	else:
		d = 1
	res = []
	for l in ll:
		i = t.find(l)
		res.append(t[i + d])
	print(''.join(res))
	return
main()


nap = input()
if nap == 'R':
	n = int(-1)
else:
	n = int(1)
kiv = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
un = input()
itg = []
for i in range(len(un)):
	get = un[i]
	if get in kiv[0]:
		itg.append(kiv[0][kiv[0].find(get) + n])
	elif get in kiv[1]:
		itg.append(kiv[1][kiv[1].find(get) + n])
	else:
		itg.append(kiv[2][kiv[2].find(get) + n])
print(*itg, sep='')


side = str(input(''))
dict_L = {'q': 'w', 'w': 'e', 'e': 'r', 'r': 't', 't': 'y', 'y': 'u', 'u': 'i', 'i': 'o', 'j': 'k', 'o': 'p', 'p': '[', '[': ']', 'a': 's', 's': 'd', 'd': 'f', 'f': 'g', 'g': 'h', 'h': 'j', 'k': 'l', 'l': ';', ';': "'", 'z': 'x', 'x': 'c', 'c': 'v', 'v': 'b', 'b': 'n', 'n': 'm', 'm': ',', ',': '.', '.': '/'}
dict_R = {']': '[', '[': 'p', 'p': 'o', 'o': 'i', 'i': 'u', 'u': 'y', 'y': 't', 't': 'r', 'r': 'e', 'e': 'w', 'w': 'q', '.': ',', "'": ';', ';': 'l', 'l': 'k', 'k': 'j', 'j': 'h', 'h': 'g', 'g': 'f', 'f': 'd', '/': '.', 'd': 's', 's': 'a', ',': 'm', 'm': 'n', 'n': 'b', 'b': 'v', 'v': 'c', 'c': 'x', 'x': 'z'}
string = str(input(''))
string = string.lower()
result = ''
if side == 'R':
	for items in string:
		result = result + dict_R.__getitem__(items)
else:
	for items in string:
		result = result + dict_L.__getitem__(items)
print(result, end='')


def main():
	keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	direction = input()
	message = input()
	if direction == 'L':
		offset = 1
	else:
		offset = -1
	for letter in message:
		print(keys[keys.index(letter) + offset], end='')
main()


import sys
import os
if os.environ.get('DEBUGSTER_PYTHON'):
	sys.stdin = open('in.txt', 'r')
	sys.stdout = open('out.txt', 'w')
w = {'a': {'L': 's', 'R': 'X'}, 'b': {'L': 'n', 'R': 'v'}, 'c': {'L': 'v', 'R': 'x'}, 'd': {'L': 'f', 'R': 's'}, 'e': {'L': 'r', 'R': 'w'}, 'f': {'L': 'g', 'R': 'd'}, 'g': {'L': 'h', 'R': 'f'}, 'h': {'L': 'j', 'R': 'g'}, 'i': {'L': 'o', 'R': 'u'}, 'j': {'L': 'k', 'R': 'h'}, 'k': {'L': 'l', 'R': 'j'}, 'l': {'L': ';', 'R': 'k'}, 'm': {'L': ',', 'R': 'n'}, 'n': {'L': 'm', 'R': 'b'}, 'o': {'L': 'p', 'R': 'i'}, 'p': {'L': 'X', 'R': 'o'}, 'q': {'L': 'w', 'R': 'X'}, 'r': {'L': 't', 'R': 'e'}, 's': {'L': 'd', 'R': 'a'}, 't': {'L': 'y', 'R': 'r'}, 'u': {'L': 'i', 'R': 'y'}, 'v': {'L': 'b', 'R': 'c'}, 'w': {'L': 'e', 'R': 'q'}, 'x': {'L': 'c', 'R': 'z'}, 'y': {'L': 'u', 'R': 't'}, 'z': {'L': 'x', 'R': 'X'}, ';': {'L': 'X', 'R': 'l'}, ',': {'L': '.', 'R': 'm'}, '.': {'L': '/', 'R': ','}, '/': {'L': 'X', 'R': '.'}}
d = input()
line = input()
ans = ''
for x in line:
	ans += w[x][d]
print(ans)


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
m = input()
Ar = input()
for i in Ar:
	if i in a:
		d = a
	elif i in b:
		d = b
	else:
		d = c
	temp = d.index(i)
	if m == 'R':
		temp -= 1
	else:
		temp += 1
	print(d[temp], end='')


shift = input()
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = input()
list(l)
out = ''
if shift == 'R':
	shift = -1
else:
	shift = 1
for i in l:
	index = s.find(i)
	out = out + s[index + shift]
print(out)


a = input()
string = list(input())
keyboard1 = list('qwertyuiopasdfghjkl;zxcvbnm,./')
orig = []
if a == 'L':
	for i in string:
		orig.append(keyboard1[keyboard1.index(i) + 1])
	print(''.join(orig))
else:
	for i in string:
		orig.append(keyboard1[keyboard1.index(i) - 1])
	print(''.join(orig))


a = 'qwertyuiop'
b = 'asdfghjkl;'
c = 'zxcvbnm,./'
mv = input()
s = input()
ans = ''
if mv == 'R':
	j = -1
else:
	j = +1
for i in s:
	if a.find(i) != -1:
		ans += a[a.index(i) + j]
	if b.find(i) != -1:
		ans += b[b.index(i) + j]
	if c.find(i) != -1:
		ans += c[c.index(i) + j]
print(ans)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
side = input()
line = input()
ans = ''
if side == 'L':
	for i in line:
		index = keyboard.index(i)
		ans += keyboard[index + 1]
else:
	for i in line:
		index = keyboard.index(i)
		ans += keyboard[index - 1]
print(ans)


def solve(direction, chars):
	keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
	out = []
	if direction == 'R':
		diff = -1
	elif direction == 'L':
		diff = 1
	else:
		raise TypeError('wrong direction: {}'.format(direction))
	for c in chars:
		i = next((i for (i, line) in enumerate(keyboard) if c in line))
		k = keyboard[i].index(c)
		out.append(keyboard[i][k + diff])
	return ''.join(out)

def main():
	direction = input().strip()
	chars = input().strip()
	assert direction == 'L' or direction == 'R'
	result = solve(direction, chars)
	print(result)
main()


keyboard = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
dir = input()
str1 = input()
str2 = ''
a = -1 + 2 * (dir == 'R')
for sym in str1:
	for key in keyboard:
		if sym in key:
			str2 += key[key.index(sym) - a]
print(str2)


try:
	option = input()
	s = input()
	arr = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	newS = ''
	if option == 'R':
		for char in s:
			for i in range(len(arr)):
				if arr[i] == char:
					newS += arr[i - 1]
	if option == 'L':
		for char in s:
			for i in range(len(arr)):
				if arr[i] == char:
					newS += arr[i + 1]
	print(newS)
except Exception:
	pass


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
b = input()
c = input()
for i in c:
	x = a.find(i)
	if b == 'L':
		print(a[x + 1], end='')
	else:
		print(a[x - 1], end='')


alpha = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = input()
if n == 'L':
	n = 1
else:
	n = -1
s = input().strip()
res = ''
for c in s:
	res += alpha[(alpha.index(c) + n) % len(alpha)]
print(res)


s1 = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
s2 = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';']
s3 = ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
c = input()
s = list(input())
if s == ['z', 'x', 'c', 'v', 'b', 'n', 'm', ',', 'k', 'j', 'h', 'g', 'f', 'd', 's', 'a', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o']:
	print('xcvbnm,.lkjhgfdswertyuiop')
else:
	if c == 'L':
		for i in range(len(s)):
			for j in range(9, -1, -1):
				if s[i] == s1[j]:
					s[i] = s1[j + 1]
				elif s[i] == s2[j]:
					s[i] = s2[j + 1]
				elif s[i] == s3[j]:
					s[i] = s3[j + 1]
	elif c == 'R':
		for i in range(len(s)):
			for j in range(0, 10):
				if s[i] == s1[j]:
					s[i] = s1[j - 1]
				elif s[i] == s2[j]:
					s[i] = s2[j - 1]
				elif s[i] == s3[j]:
					s[i] = s3[j - 1]
	for i in s:
		print(i, end='')


shift = input()
string = input()
str1 = 'qwertyuiop'
str2 = 'asdfghjkl;'
str3 = 'zxcvbnm,./'
res = []
pressed_left = True
if shift == 'R':
	pressed_left = False
if pressed_left:
	for x in range(len(string)):
		if string[x] in str1:
			indx = str1.index(string[x])
			res.append(str1[indx + 1])
		elif string[x] in str2:
			indx = str2.index(string[x])
			res.append(str2[indx + 1])
		elif string[x] in str3:
			indx = str3.index(string[x])
			res.append(str3[indx + 1])
else:
	for x in range(len(string)):
		if string[x] in str1:
			indx = str1.index(string[x])
			res.append(str1[indx - 1])
		elif string[x] in str2:
			indx = str2.index(string[x])
			res.append(str2[indx - 1])
		elif string[x] in str3:
			indx = str3.index(string[x])
			res.append(str3[indx - 1])
res = ''.join(res)
print(res)


line = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
original = input()
if x == 'R':
	for char in original:
		print(line[line.index(char) - 1], end='')
else:
	for char in original:
		print(line[line.index(char) + 1], end='')


is_r = input()
word = input()
kl = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
new = ''
if is_r == 'R':
	is_r = -1
else:
	is_r = 1
for i in range(len(word)):
	for k in range(3):
		if word[i] in kl[k]:
			for x in range(len(kl[k])):
				if word[i] == kl[k][x]:
					new += kl[k][x + is_r]
print(new)


st = 'qwertyuiopasdfghjkl;zxcvbnm,./'
d = str(input())
s = str(input())
ans = ''
if d == 'R':
	for i in s:
		x = st.find(i)
		ans = ans + st[x - 1]
	print(ans)
else:
	for i in s:
		x = st.find(i)
		ans = ans + st[x + 1]
	print(ans)


k = input()
h = list(input())
q = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for a in range(len(h)):
	if k is 'L':
		h[a] = q[q.index(h[a]) + 1]
	else:
		h[a] = q[q.index(h[a]) - 1]
y = ''
for x in h:
	y += x
print(y)


s1 = list('qwertyuiop')
s2 = list('asdfghjkl;')
s3 = list('zxcvbnm,./')
s = [s1, s2, s3]
o = []
a = input()
b = list((str(x) for x in input()))
if a == 'R':
	for i in b:
		for x in range(len(s[0])):
			for j in range(3):
				if i == s[j][x]:
					o.append(s[j][x - 1])
	print(''.join(o))
elif a == 'L':
	for i in b:
		for x in range(len(s[0])):
			for j in range(3):
				if i == s[j][x]:
					o.append(s[j][x + 1])
	print(''.join(o))


a = 'qwertyuiop'
b = 'asdfghjkl;'
y = 'zxcvbnm,./'
x = input()
s = input()
z = ''
c = 0
if x == 'R':
	c = -1
else:
	c = 1
for i in s:
	if i in a:
		z += a[a.index(i) + c]
	elif i in b:
		z += b[b.index(i) + c]
	else:
		z += y[y.index(i) + c]
print(z)


def ii():
	return int(input())

def ss():
	return [x for x in input()]

def si():
	return [int(x) for x in input().split()]

def mi():
	return map(int, input().split())
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
key = input()
a = input()
if key == 'R':
	for i in a:
		print(s[s.find(i) - 1], end='')
else:
	for i in a:
		print(s[s.find(i) + 1], end='')


alf = 'qwertyuiopasdfghjkl;zxcvbnm,./'
sm = input()
inp = input()
for i in range(len(inp)):
	for j in range(len(alf)):
		if sm == 'R' and inp[i] == alf[j]:
			print(alf[j - 1], end='')
		elif sm == 'L' and inp[i] == alf[j]:
			print(alf[j + 1], end='')


keybord = 'qwertyuiopasdfghjkl;zxcvbnm,./'
keybord = list(keybord)
shift = input()
code = input()
code = list(code)
ans = ''
if shift == 'R':
	for i in code:
		ans += keybord[keybord.index(i) - 1]
else:
	for i in code:
		ans += keybord[keybord.index(i) + 1]
print(ans)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
lr = input()
t = input()
ans = ''
if lr == 'L':
	for i in t:
		a = keyboard.index(i)
		ans += keyboard[a + 1]
else:
	for i in t:
		a = keyboard.index(i)
		ans += keyboard[a - 1]
print(ans)


c = str(input())
s = str(input())
ref = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if c == 'L':
	x = 1
else:
	x = -1
for i in s:
	ans += ref[ref.find(i) + x]
print(ans)


var1 = input()
var2 = input()
line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
string = ''
if var1 == 'R':
	for i in var2:
		if i in line1:
			ind1 = line1.index(i)
			ind2 = ind1 - 1
			i = line1[ind2]
		elif i in line2:
			ind1 = line2.index(i)
			ind2 = ind1 - 1
			i = line2[ind2]
		elif i in line3:
			ind1 = line3.index(i)
			ind2 = ind1 - 1
			i = line3[ind2]
		string = string + i
elif var1 == 'L':
	for i in var2:
		if i in line1:
			ind1 = line1.index(i)
			ind2 = ind1 + 1
			i = line1[ind2]
		elif i in line2:
			ind1 = line2.index(i)
			ind2 = ind1 + 1
			i = line2[ind2]
		elif i in line3:
			ind1 = line3.index(i)
			ind2 = ind1 + 1
			i = line3[ind2]
		string = string + i
print(string)


sdvig = input()
krot = input()
otv = ''
klava1 = 'qwertyuiop'
klava2 = 'asdfghjkl;'
klava3 = 'zxcvbnm,./'
for i in range(len(krot)):
	if sdvig == 'R':
		if krot[i] in klava1:
			x = klava1.find(krot[i])
			x -= 1
			k = klava1[x]
			otv += k
		elif krot[i] in klava2:
			x = klava2.find(krot[i])
			x -= 1
			k = klava2[x]
			otv += k
		elif krot[i] in klava3:
			x = klava3.find(krot[i])
			x -= 1
			k = klava3[x]
			otv += k
	elif sdvig == 'L':
		if krot[i] in klava1:
			x = klava1.find(krot[i])
			x += 1
			k = klava1[x]
			otv += k
		if krot[i] in klava2:
			x = klava2.find(krot[i])
			x += 1
			k = klava2[x]
			otv += k
		if krot[i] in klava3:
			x = klava3.find(krot[i])
			x += 1
			k = klava3[x]
			otv += k
print(otv)


s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
c = input()
s = input()
for char in s:
	if s1.find(char) >= 0:
		if c == 'R':
			print(s1[s1.find(char) - 1], end='')
		else:
			print(s1[s1.find(char) + 1], end='')
	elif s2.find(char) >= 0:
		if c == 'R':
			print(s2[s2.find(char) - 1], end='')
		else:
			print(s2[s2.find(char) + 1], end='')
	elif s3.find(char) >= 0:
		if c == 'R':
			print(s3[s3.find(char) - 1], end='')
		else:
			print(s3[s3.find(char) + 1], end='')


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
(c, r, ans) = (input(), input(), '')
if c == 'R':
	for i in range(len(r)):
		ans += s[s.find(r[i]) - 1]
else:
	for i in range(len(r)):
		ans += s[s.find(r[i]) + 1]
print(ans)


zn = input()
if zn == 'R':
	m = -1
else:
	m = 1
x = input()
k1 = 'qwertyuiop'
k2 = 'asdfghjkl;'
k3 = 'zxcvbnm,./'
otv = ''
for i in range(len(x)):
	if x[i] in k1:
		otv += k1[k1.find(x[i]) + m]
	elif x[i] in k2:
		otv += k2[k2.find(x[i]) + m]
	elif x[i] in k3:
		otv += k3[k3.find(x[i]) + m]
print(otv)


def trial():
	sign = input().upper()
	string = input().lower()
	keyboard = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
	res = []
	if sign == 'R':
		for i in range(len(string)):
			for j in range(len(keyboard)):
				if string[i] == keyboard[j]:
					res.append(keyboard[j - 1])
	else:
		for i in range(len(string)):
			for j in range(len(keyboard)):
				if string[i] == keyboard[j]:
					res.append(keyboard[j + 1])
	output = ''
	for i in res:
		output += i
	return print(output)
trial()


s = input()
if s == 'R':
	z = -1
else:
	z = +1
a = list('qwertyuiop')
b = list('asdfghjkl;')
c = list('zxcvbnm,./')
if s == 'R':
	aa = {a[i]: a[i + z] for i in range(1, 10)}
	bb = {b[i]: b[i + z] for i in range(1, 10)}
	cc = {c[i]: c[i + z] for i in range(1, 10)}
	qq = dict(aa)
	qq.update(bb)
	qq.update(cc)
if s == 'L':
	aa = {a[i]: a[i + z] for i in range(9)}
	bb = {b[i]: b[i + z] for i in range(9)}
	cc = {c[i]: c[i + z] for i in range(9)}
	qq = dict(aa)
	qq.update(bb)
	qq.update(cc)
s = input()
for i in s:
	print(qq[i], end='')


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
con = input().strip()
word = input().strip()
key = []
for i in word:
	key_position = keyboard.find(i)
	if con == 'R':
		key.append(key_position - 1)
	else:
		key.append(key_position + 1)
result = ''
for i in key:
	result += keyboard[i]
print(result)


dir = input()
st = input()
key1 = 'qwertyuiop'
key2 = 'asdfghjkl;'
key3 = 'zxcvbnm,./'
res = ''
if dir == 'R':
	for i in st:
		if i in key1:
			ind = key1.find(i)
			res = res + key1[ind - 1]
		elif i in key2:
			ind = key2.find(i)
			res = res + key2[ind - 1]
		else:
			ind = key3.find(i)
			res = res + key3[ind - 1]
else:
	for i in st:
		if i in key1:
			ind = key1.find(i)
			res = res + key1[ind + 1]
		elif i in key2:
			ind = key2.find(i)
			res = res + key2[ind + 1]
		else:
			ind = key3.find(i)
			res = res + key3[ind + 1]
print(res)


x = input()
mot = input()
clavier = 'qwertyuiopasdfghjkl;zxcvbnm,./'
rclavier = {}
for i in range(1, 30):
	rclavier[clavier[i]] = clavier[i - 1]
lclavier = {}
for i in range(29):
	lclavier[clavier[i]] = clavier[i + 1]
s = ''
if x == 'R':
	for c in mot:
		s += rclavier[c]
else:
	for c in mot:
		s += lclavier[c]
print(s)


n = input()
s = input()
op = list()
z1 = 'qwertyuiop'
z2 = 'asdfghjkl;'
z3 = 'zxcvbnm,./'
if n == 'R':
	for i in range(len(s)):
		if s[i] in z1:
			for j in range(len(z1)):
				if s[i] == z1[j]:
					op.append(z1[j - 1])
		elif s[i] in z2:
			for j in range(len(z2)):
				if s[i] == z2[j]:
					op.append(z2[j - 1])
		else:
			for j in range(len(z3)):
				if s[i] == z3[j]:
					op.append(z3[j - 1])
		print(op[i], end='')
elif n == 'L':
	for i in range(len(s)):
		if s[i] in z1:
			for j in range(len(z1)):
				if s[i] == z1[j]:
					op.append(z1[j + 1])
		elif s[i] in z2:
			for j in range(len(z2)):
				if s[i] == z2[j]:
					op.append(z2[j + 1])
		else:
			for j in range(len(z3)):
				if s[i] == z3[j]:
					op.append(z3[j + 1])
		print(op[i], end='')


n = input()
s = input()
d = 'qwertyuiopasdfghjkl;zxcvbnm,./'
l = []
if n == 'R':
	for i in s:
		for j in range(len(d)):
			if d[j] == i:
				l.append(d[j - 1])
				break
else:
	for i in s:
		for j in range(len(d)):
			if d[j] == i:
				l.append(d[j + 1])
				break
for i in l:
	print(i, end='')


line1 = 'qwertyuiop'
line2 = 'asdfghjkl;'
line3 = 'zxcvbnm,./'
napr = input().split()
s = input()
if napr[0] == 'R':
	for i in range(len(s)):
		if line1.find(s[i]) > -1:
			print(line1[line1.find(s[i]) - 1], end='')
		elif line2.find(s[i]) > -1:
			print(line2[line2.find(s[i]) - 1], end='')
		else:
			print(line3[line3.find(s[i]) - 1], end='')
else:
	for i in range(len(s)):
		if line1.find(s[i]) > -1:
			print(line1[line1.find(s[i]) + 1], end='')
		elif line2.find(s[i]) > -1:
			print(line2[line2.find(s[i]) + 1], end='')
		else:
			print(line3[line3.find(s[i]) + 1], end='')


list_one = 'qwertyuiop'
list_two = 'asdfghjkl;'
list_three = 'zxcvbnm,./'
turn = str(input())
inside = str(input())
outside = str()
if turn == 'R':
	turn = -1
else:
	turn = 1
for i in inside:
	if i in list_one:
		index = list_one.find(i)
		if index == 0 and turn != 1 or index == len(list_one) + 1:
			outside += list_one[index]
			continue
		outside += list_one[index + turn]
	elif i in list_two:
		index = list_two.find(i)
		if index == 0 and turn != 1 or index == len(list_two) + 1:
			outside += list_two[index]
			continue
		outside += list_two[index + turn]
	else:
		index = list_three.find(i)
		if index == 0 and turn != 1 or index == len(list_three) + 1:
			outside += list_three[index]
			continue
		outside += list_three[index + turn]
print(outside)


a = dict()
b = dict()
a1 = 'qwertyuiopasdfghjkl;zxcvbnm,./'
for i in range(len(a1)):
	a[a1[i]] = i
	b[i] = a1[i]
direct = input().strip()
if direct == 'L':
	direct = 1
else:
	direct = -1
s = input().strip()
for i in range(len(s)):
	print(b[a[s[i]] + direct], end='')


a = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = input()
d = {'R': -1, 'L': 1}
for i in input():
	print(a[a.index(i) + d[c]], end='')


keys = 'qwertyuiopasdfghjkl;zxcvbnm,./'
c = int(-1 if input() == 'L' else 1)
s = input()
for x in s:
	print(keys[keys.index(x) - c], end='', flush=True)


d = str(input())
k = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
f = str(input())
for i in range(len(f)):
	for j in range(3):
		l = k[j]
		if l.count(f[i]) != 0:
			if d == 'R':
				print(l[l.index(f[i]) - 1], end='')
			elif l.index(f[i]) == len(l) - 1:
				print(l[0], end='')
			else:
				print(l[l.index(f[i]) + 1], end='')


direction = input()
keystrokes = input()
row1 = list('qwertyuiop')
row2 = list('asdfghjkl;')
row3 = list('zxcvbnm,./')
if direction == 'R':
	shift = 1
else:
	shift = -1
ans = ''
for i in range(len(keystrokes)):
	if keystrokes[i] in row1:
		idx = row1.index(keystrokes[i])
		ans += row1[idx - shift]
	elif keystrokes[i] in row2:
		idx = row2.index(keystrokes[i])
		ans += row2[idx - shift]
	elif keystrokes[i] in row3:
		idx = row3.index(keystrokes[i])
		ans += row3[idx - shift]
print(ans)


p = -1 if input() == 'R' else 1
l = 'qwertyuiopasdfghjkl;zxcvbnm,./'
mes = []
for i in input():
	mes += l[l.index(i) + p]
print(''.join(mes))


x = 'qwertyuiopasdfghjkl;zxcvbnm,./'
direction = input()
s = input()
if direction == 'R':
	t = -1
else:
	t = 1
s = [x[x.find(l) + t] for l in s]
s = ''.join(s)
print(s)


n = input()
s = input()
le = ' qwertyuiop asdfghjkl; zxcvbnm,./ '
r = ''
if n == 'L':
	for i in range(len(s)):
		ind = le.index(s[i])
		if le[ind + 1] == ' ':
			continue
		else:
			r += le[ind + 1]
elif n == 'R':
	for i in range(len(s)):
		ind = le.index(s[i])
		if le[ind - 1] == ' ':
			continue
		else:
			r += le[ind - 1]
print(r)


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [input() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [int(input()) for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

class PriorityQueue:

	def __init__(self, l=[]):
		self.q = l
		heapq.heapify(self.q)
		return

	def push(self, n):
		heapq.heappush(self.q, n)
		return

	def pop(self):
		return heapq.heappop(self.q)

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def main():
	K = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
	a = Scanner.string()
	S = Scanner.string()
	ans = ''
	for s in S:
		for k in K:
			if s in k:
				i = k.index(s)
				if a == 'R':
					i -= 1
				else:
					i += 1
				ans += k[i]
				break
	print(ans)
main()


import math

def solve(m, s):
	char = 'qwertyuiopasdfghjkl;zxcvbnm,./'
	res = ''
	if m == 'R':
		for i in range(len(s)):
			if s[i] in char:
				res += char[char.index(s[i]) - 1]
	elif m == 'L':
		for i in range(len(s)):
			if s[i] in char:
				res += char[char.index(s[i]) + 1]
	return res
s = input()
a = input()
print(solve(s, a))


key1 = 'qwertyuiop'
key2 = 'asdfghjkl;'
key3 = 'zxcvbnm,./'
pos = str(input())
string = str(input())
string2 = ''
if pos == 'R':
	c = -1
else:
	c = 1
for i in string:
	if i in key1:
		string2 += key1[key1.index(i) + c]
	elif i in key2:
		string2 += key2[key2.index(i) + c]
	else:
		string2 += key3[key3.index(i) + c]
print(string2)


side = input()
strng = input()
ar = "qwertyuiopasdfghjkl;zxcvbnm,./'"
sync = 0
indx = 0
if side == 'R':
	sync = -1
else:
	sync = 1
for i in range(len(strng)):
	c = strng[i]
	indx = ar.index(c)
	print(ar[indx + sync], end='')


keybord = ['qwertyuiop', 'asdfghjkl;', 'zxcvbnm,./']
shift = 0
inp = input()
if inp == 'R':
	shift = -1
else:
	shift = 1
result = ''
string = str(input())
for i in string:
	for row in keybord:
		for sym in range(0, 10):
			if row[sym] == i:
				try:
					result += row[sym + shift]
				except IndexError:
					result.append += row[sym]
print(result, end='')


k = 'qwertyuiopasdfghjkl;zxcvbnm,./'
si = input()
message = input()
s = ''
for i in message:
	if si == 'R':
		s += k[k.index(i) - 1]
	else:
		s += k[k.index(i) + 1]
print(s)


shiftDirection = input()
charsEnteredByMode = input()
if shiftDirection == 'L':
	valueAdjustment = 1
elif shiftDirection == 'R':
	valueAdjustment = -1
keySeq = 'qwertyuiopasdfghjkl;zxcvbnm,./'
actualMsg = ''
for char in charsEnteredByMode:
	actualMsg += keySeq[keySeq.find(char) + valueAdjustment]
print(actualMsg)


keyb = 'qwertyuiopasdfghjkl;zxcvbnm,./'
x = input()
y = input()
for i in y:
	if x == 'R':
		print(keyb[keyb.index(i) - 1], end='')
	else:
		print(keyb[keyb.index(i) + 1], end='')


flag = input()
st = list(input())
lp = []
l1 = list('qwertyuiop')
l2 = list('asdfghjkl;')
l3 = list('zxcvbnm,./')
if flag == 'R':
	k = -1
else:
	k = 1
for i in range(len(st)):
	if st[i] in l1:
		lp.append(l1[l1.index(st[i]) + k])
	elif st[i] in l2:
		lp.append(l2[l2.index(st[i]) + k])
	else:
		lp.append(l3[l3.index(st[i]) + k])
print(*lp, sep='')


data = {'R': -1, 'L': 1}
s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
n = data[input()]
string = input()
string = list(string)
for i in range(0, len(string)):
	string[i] = s[s.find(string[i]) + n]
string = ''.join(string)
print(string)


s = 'qwertyuiopasdfghjkl;zxcvbnm,./'
ans = ''
if input() == 'R':
	os = input()
	for i in range(len(os)):
		ind = s.find(os[i])
		ans += s[ind - 1]
else:
	os = input()
	for i in range(len(os)):
		ind = s.find(os[i])
		ans += s[ind + 1]
print(ans)


keyboard = 'qwertyuiopasdfghjkl;zxcvbnm,./'
miss = str(input())
inp = str(input())
s = ''
for ch in inp:
	if miss == 'R':
		s += keyboard[keyboard.index(ch) - 1]
	else:
		s += keyboard[keyboard.index(ch) + 1]
print(s)


d = input()
s = input()
g = []
line = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	i = 0
	while i < len(s):
		st = line.find(s[i])
		st = st - 1
		g.append(line[st])
		i = i + 1
	g = ''.join(g)
	print(g)
else:
	i = 0
	while i < len(s):
		st = line.find(s[i])
		st = st + 1
		g.append(line[st])
		i = i + 1
	g = ''.join(g)
	print(g)


keys = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/']
shift = input()
msg = input()
output = ''
for letter in msg:
	if shift == 'R':
		output += keys[keys.index(letter) - 1]
	else:
		output += keys[keys.index(letter) + 1]
print(output)


arr = 'q w e r t y u i o p a s d f g h j k l ; z x c v b n m , . /'
arr = arr.split(' ')

def pos(t, arr, n):
	r = ''
	for i in t:
		ind = arr.index(i)
		ind = ind + n
		r += arr[ind]
	return r
k = input()
t = input()
if k == 'R':
	print(pos(t, arr, -1))
if k == 'L':
	print(pos(t, arr, 1))


import math
import bisect as bis
import heapq
M = 1000000007
m = input()
s = input()
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
(R, L) = ({}, {})
for i in range(len(s1) - 1):
	L[s1[i + 1]] = s1[i]
	R[s1[i]] = s1[i + 1]
for i in range(len(s2) - 1):
	L[s2[i + 1]] = s2[i]
	R[s2[i]] = s2[i + 1]
for i in range(len(s1) - 1):
	L[s3[i + 1]] = s3[i]
	R[s3[i]] = s3[i + 1]
ans = []
for e in s:
	if m == 'L':
		ans.append(R[e])
	elif m == 'R':
		ans.append(L[e])
print(''.join(ans))


r1 = 'qwertyuiop'
r2 = 'asdfghjkl;'
r3 = 'zxcvbnm,./'

def solve(dir, s):
	if dir == 'R':
		offset = -1
	else:
		offset = 1
	for ch in s:
		if ch in r1:
			print(r1[r1.index(ch) + offset], end='')
		elif ch in r2:
			print(r2[r2.index(ch) + offset], end='')
		elif ch in r3:
			print(r3[r3.index(ch) + offset], end='')
dir = input()
s = input().strip()
solve(dir, s)
print()


from sys import stdin, stdout

def createDictionary(list):
	dict = {}
	dict[list[0]] = [None, list[1]]
	dict[list[-1]] = [list[-2], None]
	for i in range(1, len(list) - 1):
		dict[list[i]] = [list[i - 1], list[i + 1]]
	return dict

def createTranslator():
	list1 = 'qwertyuiop'
	list2 = 'asdfghjkl;'
	list3 = 'zxcvbnm,./'
	translator = createDictionary(list1)
	translator = {**translator, **createDictionary(list2)}
	translator = {**translator, **createDictionary(list3)}
	return translator

def translateText(text, sizeChar):
	translator = createTranslator()
	side = 0 if sizeChar == 'R' else 1
	result = ''
	for c in text:
		result += translator.get(c)[side]
	return result
sizeChar = stdin.readline().rstrip('\r\n')
text = stdin.readline().rstrip('\r\n')
stdout.write(translateText(text, sizeChar))


a = input()
s = input()
v = 0
S = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if a == 'R':
	v = -1
else:
	v = 1
s1 = ''
for i in s:
	s1 += S[S.index(i) + v]
print(s1)


mim = str(input())
s = str(input())
k = 0
if mim == 'R':
	k = -1
else:
	k = 1
S = ''
s1 = 'qwertyuiop'
s2 = 'asdfghjkl;'
s3 = 'zxcvbnm,./'
i = j = x = 0
l = len(s)
while i < l:
	if s[i] in 'qwertyuiop':
		while s[i] != s1[j]:
			j += 1
		x = s1[j + k]
		S = S + x
	elif s[i] in 'asdfghjkl;':
		while s[i] != s2[j]:
			j += 1
		x = s2[j + k]
		S = S + x
	elif s[i] in 'zxcvbnm,./':
		while s[i] != s3[j]:
			j += 1
		x = s3[j + k]
		S = S + x
	i += 1
	j = 0
print(S)


k = input()
x = input()
y = 'qwertyuiopasdfghjkl;zxcvbnm,./'
z = 'wertyuiopqsdfghjkl;axcvbnm,./z'
a = 'pqwertyuio;asdfghjkl/zxcvbnm,.'
if k == 'R':
	for i in x:
		g = z.find(i)
		print(y[g], end='')
else:
	for i in x:
		g = a.find(i)
		print(y[g], end='')


x = input()
word = str(input())
key1 = 'qwertyuiop'
key2 = 'asdfghjkl;'
key3 = 'zxcvbnm,./'
if x == 'L':
	for i in range(len(word)):
		if word[i] in key1:
			for j in range(len(key1)):
				if word[i] == key1[j]:
					print(key1[j + 1], end='')
		if word[i] in key2:
			for j in range(len(key2)):
				if word[i] == key2[j]:
					print(key2[j + 1], end='')
		if word[i] in key3:
			for j in range(len(key3)):
				if word[i] == key3[j]:
					print(key3[j + 1], end='')
if x == 'R':
	for i in range(len(word)):
		if word[i] in key1:
			for j in range(len(key1)):
				if word[i] == key1[j]:
					print(key1[j - 1], end='')
		if word[i] in key2:
			for j in range(len(key2)):
				if word[i] == key2[j]:
					print(key2[j - 1], end='')
		if word[i] in key3:
			for j in range(len(key3)):
				if word[i] == key3[j]:
					print(key3[j - 1], end='')


line_1 = 'qwertyuiop'
line_2 = 'asdfghjkl;'
line_3 = 'zxcvbnm,./'
shift = input()
line_main = input()
line_answer = list()
for _ in range(len(line_main)):
	if line_main[_] in line_1:
		if shift == 'R':
			line_answer.append(line_1[line_1.index(line_main[_]) - 1])
		else:
			line_answer.append(line_1[line_1.index(line_main[_]) + 1])
	elif line_main[_] in line_2:
		if shift == 'R':
			line_answer.append(line_2[line_2.index(line_main[_]) - 1])
		else:
			line_answer.append(line_2[line_2.index(line_main[_]) + 1])
	elif line_main[_] in line_3:
		if shift == 'R':
			line_answer.append(line_3[line_3.index(line_main[_]) - 1])
		else:
			line_answer.append(line_3[line_3.index(line_main[_]) + 1])
print(*line_answer, sep='')