#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)

int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  string s;
  char c[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',' '}
    };
 
  while(cin>>s){
    string out;
    if (s.size() % 2){
      cout << "NA" << endl;
    }else{
      bool flag = false;
      for(int i = 1 ; i < s.size() ; i += 2){
	int y = s[i - 1] - '1';
	int x = s[i] - '1';
	if(y < 0 || x < 0 || y >= 6 || x >= 5){
	  flag = true;
	  break;
	}
	out += c[x][y]; 	
      }
      if(flag)
	cout << "NA" << endl;
      else 
	cout << out << endl;
    }
  }
}