ref="abcdefghijklmnopqrstuvwxyz.?! "
while 1:
	try:
		msg=raw_input()
		ans=""
		for i in range(0,len(msg),2):
			try:
				ans+=ref[(int(msg[i])-1)*5+int(msg[i+1])-1]
			except:
				print "NA"
				break
		else:
			print ans
	except:
		break