hash = Hash.new(nil)
c="a"
(1..6).each{|i|
  (1..5).each{|j|
    hash["#{i}#{j}"]=c
    c=c.succ
  }
}
hash["62"]="."
hash["63"]="?"
hash["64"]="!"
hash["65"]=" "
while gets
  $_.gsub!(/(\d\d)/,'\1\2 ')
  out = ""
  naflag = false
  $_.split.each{|s|
    if hash[s]
      out << hash[s]
    else naflag =true
    end
  }
  puts naflag ? "NA" : out
end