r=io.read f=r()s=r()print(f>'e'and('%X'):rep(#s):format(s:byte(1,-1))..s:sub(90,90)or'abcDIOEH(ASUD9*U09u809ihiudhsadij)£$I()!))')