d = raw_input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	d = -1
else:
	d = +1

s = raw_input()
t = ''
for i in s:
	t += key[key.index(i) + d]
print t
6c9d1c988803bef2fc90a52ff84e4eb6f3020576
d = raw_input()
key = 'qwertyuiopasdfghjkl;zxcvbnm,./'
if d == 'R':
	d = -1
else:
	d = +1

s = raw_input()
t = ''
for i in s:
	t += key[key.index(i) + d]
print t