#include<iostream>
#include<string>
using namespace std;
int main(){
  string str;
  char hyou[6][7];
  hyou[1][6] = 'z';
  hyou[2][6] = '.';
  hyou[3][6] = '?';
  hyou[4][6] = '!';
  hyou[5][6] = ' ';
  for(int i=1;i<=5;i++){
    for(int j=1;j<=5;j++){
      hyou[i][j] = 'a'+(j-1)*5+i-1;
    }
  }
  
  while(cin >> str){
    if(str.size()%2 != 0){
      cout << "NA" << endl;
      continue;
    }
    for(int i=0;i<str.size();i+=2){
      cout << hyou[ str[i+1]-'0'][str[i]-'0'];
    } cout << endl;
  }

  return (0);
}