#include <iostream>
#include <string>
using namespace std;

int main(){
char moji[5][7] = {{'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){
        for(int i=0;i<s.size();i+=2){
            if(s.size() % 2 != 0) {
                cout << "NA";
                break;
            }
            cout << moji[(s[i+1]%'0')-1][(s[i]%'0')-1];
        }
        cout << endl;
    }
}