#include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    string s, ans;
    while(cin >> s){
        int i = 0;
        char a;
        ans = "";
        while(i < s.size()){
            if(s.size() % 2){
                ans = "NA";
                break;
            }
            if(s[i] == '1'){
                a = ('a' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '2'){
                a = ('f' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '3'){
                a = ('k' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '4'){
                a = ('p' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '5'){
                a = ('u' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '6'){
                if(s[i + 1] == '1')
                    a = 'z';
                else if(s[i + 1] == '2')
                    a = '.';
                else if(s[i + 1] == '3')
                    a = '?';
                else if(s[i + 1] == '4')
                    a = '!';
                else if(s[i + 1] == '5')
                    a = ' ';
            }else{
                ans = "NA";
                break;
            }
            ans+= a;
            i+= 2;
        }
        cout << ans << endl;
    }
}