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