ref=["abcde","fghij","klmno","pqrst","uvwxy","z.?! "]
while 1:
	try:
		inp=raw_input()
		msg=""
		for i in range(0,len(inp),2):
			try:
				msg+=ref[int(inp[i])-1][int(inp[i+1])-1]
			except:
				msg="NA"
				break
		print msg
	except:
		break