#include<iostream>
using namespace std;
int main(){
  char c[6][5] = {{'a','b','c','d','e'},{'f','g','h','i','j'},{'k','l','m','n','o'},{'p','q','r','s','t'},{'u','v','w','x','y'},{'z','.','?','!',' '}};
  string s;
  while(cin>>s){
    string ans="";
    if(s.size()%2==0){for(int i=0;i<s.size();i+=2)ans+=c[s[i]-'0'-1][s[i+1]-'0'-1];
    cout<<ans<<endl;}
    else cout<<"NA"<<endl;
  }
}