#include <iostream>
using namespace std;

int main(){
    string msg;
    while(cin >> msg){
        if( msg.length()%2 ){
            cout << "NA" << endl;
            continue;
        }
        string res = "";
        bool OK = true;
        for(int i = 0; i < msg.length(); i+=2){
            int x = msg[i]-'0', y = msg[i+1]-'0';
            if( x < 1 || x > 6 || y < 1 || y > 5 ){
                OK = false;
                break;
            }
            char z = (x-1)*5+(y-1)+'a';
            if( 'a' <= z && z <= 'z' ) res.append(1, z);
            else{
                if( z-'a' == 26 ) res.append(1,'.');
                if( z-'a' == 27 ) res.append(1,'?');
                if( z-'a' == 28 ) res.append(1,'!');
                if( z-'a' == 29 ) res.append(1,' ');
            }
        }
        if( OK ){
            cout << res << endl;
        }else{
            cout << "NA" << endl;
        }
    }
    return 0;
}