Go: package main

import (
	"bufio"
	"os"
	"strings"
	"fmt"
		"strconv"
	)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	table := [6][5]string{
		{"a", "b", "c", "d", "e"},
		{"f", "g", "h", "i", "j"},
		{"k", "l", "m", "n", "o"},
		{"p", "q", "r", "s", "t"},
		{"u", "v", "w", "x", "y"},
		{"z", ".", "?", "!", " "},
	}
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), "")
		if len(input) % 2 != 0 {
			fmt.Println("NA")
			continue
		}
		ret := make([]string, 0)
		for i := 0; i < len(input); i += 2 {
			row, _ := strconv.Atoi(input[i])
			col, _ := strconv.Atoi(input[i+1])
			// log.Println(table[row-1][col-1])
			ret = append(ret, table[row-1][col-1])
		}
		fmt.Println(strings.Join(ret, ""))
	}
}

C++: #include <iostream>
#include <cstdlib>
using namespace std;

char convert(int x) {
  int x1 = x/10;
  int x2 = x-x1*10;
  if(x1 == 1) {
    if(x2 == 1) return 'a';
    if(x2 == 2) return 'b';
    if(x2 == 3) return 'c';
    if(x2 == 4) return 'd';
    if(x2 == 5) return 'e';
  }
  if(x1 == 2) {
    if(x2 == 1) return 'f';
    if(x2 == 2) return 'g';
    if(x2 == 3) return 'h';
    if(x2 == 4) return 'i';
    if(x2 == 5) return 'j';
  }
  if(x1 == 3) {
    if(x2 == 1) return 'k';
    if(x2 == 2) return 'l';
    if(x2 == 3) return 'm';
    if(x2 == 4) return 'n';
    if(x2 == 5) return 'o';
  }
  if(x1 == 4) {
    if(x2 == 1) return 'p';
    if(x2 == 2) return 'q';
    if(x2 == 3) return 'r';
    if(x2 == 4) return 's';
    if(x2 == 5) return 't';
  }
  if(x1 == 5) {
    if(x2 == 1) return 'u';
    if(x2 == 2) return 'v';
    if(x2 == 3) return 'w';
    if(x2 == 4) return 'x';
    if(x2 == 5) return 'y';
  }
  if(x1 == 6) {
    if(x2 == 1) return 'z';
    if(x2 == 2) return '.';
    if(x2 == 3) return '?';
    if(x2 == 4) return '!';
    if(x2 == 5) return ' ';
  }
  return '1';
}

int main() {
  string str;
  char ans[200];
  while(cin >> str) {
    if(str.size() % 2 == 1) {
      cout << "NA" << endl;
    }
    else {
      int j=0;
      for(unsigned int i=0;i<str.size();i+=2) {
	int x = atoi(str.substr(i,2).c_str());
	ans[j] = convert(x);
	j++;
	if(convert(x) == '1') {
	  cout << "NA" << endl;
	  return 0;
	}
      }
      ans[j] = '\0';
      cout << ans << endl;
    }
  }
}

C++: #include <iostream>

using namespace std;

string translate[] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};

int main()
{
    string s;

    while (cin >> s) {
        string out;
        bool flag = true;

        for (int i = 0; i < s.size(); i += 2) {
            int col = s[i] - '0';
            int row = s[i + 1] - '0';

            if (col < 1 || col > 6 || row < 1 || row > 5) {
                cout << "NA\n";
                flag = false;
                break;
            }
            
            out.push_back(translate[row - 1][col - 1]);
        }
        if (flag)
            cout << out << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <string>
#include <cstdlib>
using namespace std;

int main(){
	int x,y,f;
	string str;
	const char *table[] = {"abcde","fghij","klmno","pqrst","uvwxy","z.?! "};
	while(cin >> str){
		string t,tmp;
		f = 1;
		if(str.size() % 2 == 0){
			for(int i = 0;i < str.size();i += 2){
				tmp = str[i];
				x = atoi(tmp.c_str());
				tmp = str[i+1];
				y = atoi(tmp.c_str());
				if(x > 4 || y > 5 || x == 0 || y == 0){
					cout << "NA" << endl;
					f = 0;
					break;
				}
				if(f) t += table[x][y];
			}
			if(f) cout << t << endl;
		}
		else{
			cout << "NA" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	string alpha = "abcdefghijklmnopqrstuvwxyz.?! ";
	char table[5][6];

	int t = 0;
	rep(i,6)
	{
		rep(j,5)
		{
			table[j][i] = alpha[t];
			t++;
		}
	}
	
	string s;
	while(cin >> s)
	{
		if(s.size()%2 != 0)
		{
			cout << "NA" << endl;
		}
		else
		{
			t = 0;
			bool flag = true;
			vector<char> v;
			while(true)
			{
				if(t >= s.size())
				{
					break;
				}
			
				int a = s[t] - '1';
				int b = s[t+1] - '1';

				if(0 <= a && a < 6 && 0 <= b && b < 5)
				{
					v.push_back(table[b][a]);
				}
				else
				{
					flag = false;
				}

				t += 2;
			}
			if(flag)
			{
				rep(i,v.size())
				{
					cout << v[i];
				}
				cout << endl;
			}
			else
			{
				cout << "NA" << endl;
			}
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
	string str;
	char poke[6][6]={{"abcde"},{"fghij"},{"klmno"},{"pqrst"},{"uvwxy"},{"z.?! "}};
	while(cin>>str){
		if(str.size()%2!=0)cout<<"NA"<<endl;
		else {
			string ans;
			bool kawa=0;
			for(int i=1;i<str.size();i+=2){
				if(str[i-1]-'1'<0||str[i-1]-'1'>5||str[i]-'1'<0||str[i]-'1'>4){
					kawa=1;
					break;
				}
				else ans+=poke[str[i-1]-'1'][str[i]-'1'];
			}
			if(kawa)cout<<"NA"<<endl;
			else cout<<ans<<endl;
		}
	}
	return 0;
}

C++: 
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  string s;
  char a[6][6]={"abcde","fghij","klmno","pqrst","uvwxy","z.?! "};
  while(cin>>s){
    string ans="";
    if(s.size()%2){
      cout<<"NA"<<endl;
      continue;
    }
    rep(i,s.size()){
      if(s[i]>'6' || s[i+1]>'5'){
	ans="NA";
	break;
      }
      ans+=a[s[i]-'0'-1][s[i+1]-'0'-1];
      i++;
    }
    cout<<ans<<endl;
  }
}

C++: #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>


#ifdef _DEBUG
#define typeof(X) std::identity<decltype(X)>::type //C++0x (for vs2010)
#else
#define typeof(X) __typeof__(X) // for gcc
#endif

#define sz(a)  int((a).size())
#define FOREACH(it, c) for (typeof((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define FOR(i,count) for (int i = 0; i < (int)(count); i++)

template <class T> void max_swap(T& a, const T& b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T& b) { a = min(a, b); }

using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
const int MODULO = 100000 ;
const int INF = 100000000; //1e8

typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef complex<double> Cd;

using namespace std;

void solve(char* buf){
	char t[] = "abcdefghijklmnopqrstuvwxyz.?! ";
			int n = strlen(buf);
		if(n % 2 != 0){
			puts("NA"); return ;
		}
		n /= 2;
		char nw[256];
		FOR(i,n){
			if('1' <= buf[i*2] && buf[i*2] <= '6' && '1' <= buf[i*2+1] && buf[i*2+1] <= '5'){
			int a = (buf[i*2] - '0') * 5 + buf[i*2+1] - '0' - 6;
			nw[i] = t[a];
			} else {
				puts("NA"); return ;
			}
		}
		nw[n] = '\0';
		puts(nw);
}

int main()
{
	char buf[256];
	while(~scanf("%s",buf)){
		solve(buf);
	}
	return 0;
}