const line1 = readline()
const line2 = readline()
const ruleFun = (num, flag) => {
// 加密
if(flag){
if(num === 57){
return num - 9
}else if(num >= 48 && num <= 56){
return num + 1
}else if(num >= 65 && num <= 89){
return num + 33
}else if(num >= 97 && num <= 121){
return num - 31
}else if(num === 90){
return num + 7
}else if(num === 122){
return num - 57
}
}else{
if(num === 48){
return num + 9
}else if(num >= 49 && num <= 57){
return num - 1
}else if(num >= 66 && num <= 90){
return num + 31
}else if(num >= 98 && num <= 122){
return num - 33
}else if(num === 65){
return num + 57
}else if(num === 97){
return num - 7
}
}
return num
}
const passwordFun = (str, flag) => {
const LEN = str.length
let res = ''
for(let i = 0; i < LEN; i++){
res += String.fromCharCode(ruleFun(str[i].charCodeAt(),flag))
}
console.log(res)
}
passwordFun(line1,1)
passwordFun(line2,0)