#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

typedef istringstream ISS;
typedef ostringstream OSS;
typedef vector<string> VS;
typedef int INT;
typedef vector<INT> VI;
typedef vector<VI> VVI;
typedef pair <INT, INT> II;
typedef vector <II> VII;

template<class T> ostream& operator << ( ostream& os, vector<T> v ) {
    for ( typename vector<T>::iterator it_i = v.begin(); it_i != v.end(); ++it_i ) {
        os << *it_i << ", ";
    }
    return os;
}


const string NA = "NA";
string s;

bool isValid( char c, char l, char r ) {
    return l <= c && c <= r;
}

const string T[6] = {
    "abcde",
    "fghij",
    "klmno",
    "pqrst",
    "uvwxy",
    "z.?! "
};

string solve() {
    string res;
    int n = s.size();
    for ( int i = 0; i < n; i += 2 ) {
        if ( i + 1 >= n ) return NA;
        if ( ! isValid( s[i], '1', '6' ) ) return NA;
        if ( ! isValid( s[i+1], '1', '5' ) ) return NA;
        int a = s[i] - '1';
        int b = s[i+1] - '1';
        res += T[a][b];
    }
    return res;
}

int main() {
    while ( getline( cin, s ) ) cout << solve() << endl;
    return 0;
}