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<cstdio>
#include<cstring>
using namespace std;
int main(){
    char a[7][7] = {"","*abcde","*fghij","*klmno","*pqrst","*uvwxy","*z.?! "};
    char s[200];
    while(~scanf("%s",s)){
        bool flg = false;
        if(strlen(s)%2==1)flg = true;
        else{
            for(int i=0;i<strlen(s);i+=2){
                if(s[i]<49||s[i]>54||s[i+1]<49||s[i+1]>53){
                    flg = true;
                    break;
                }
                printf("%c",a[s[i]-48][s[i+1]-48]);
            }

        }
        if(flg)printf("NA");
        printf("\n");
    }
    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

char buf[300];
int main() {
	while (~scanf("%s", buf)) {
		char*s = buf;
		string res;
		while (s < buf + strlen(buf)) {
			int d; sscanf(s, "%2d", &d);
			if (d <= 10 || 65 < d) { puts("NA"); goto p; }
			if (d <= 15)res += char(d + 86);
			else if (d <= 25)res += char(d + 81);
			else if (d <= 35)res += char(d + 76);
			else if (d <= 45)res += char(d + 71);
			else if (d <= 55)res += char(d + 66);
			if (d == 61)res += 'z';
			if (d == 62)res += '.';
			if (d == 63)res += '?';
			if (d == 64)res += '!';
			if (d == 65)res += ' ';
			s += 2;
		}
		cout << res;
	p:;
	}
}

C++: #include <iostream>
using namespace std;
string str[] = {"abkpuz",
		"bglqv.",
		"chmrw?",
		"dinsx!",
		"ejoty "};
int main(){
  string str2;
  cin >> str2; 
     string ans="";
    if(str2.size()%2 == 1){
      cout << "NA" << endl;
    }
    for(int i = 0 ; i < str2.size() ; i+=2){
      ans += str[str2[i+1] - '0'-1][str2[i] - '0'-1]; 
    }
    cout << ans << endl;
  return 0;
}

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

int main() {
	string a;
	while (1) {
	k:;
		cin >> a;
		if (cin.fail())break;
		if (a.length() % 2==1) { cout << "NA" << endl; continue;}
		for (int b = 0; b < a.length(); b += 2) {
			if (a[b]<'1' || a[b]>'6' || a[b + 1]<'1' || a[b + 1]>'5') { cout << "NA" << endl; goto k; }
			int s = (a[b] - 49) * 5 + (a[b + 1] - 49);
			if ((s + 97) < '{')	cout << (char)(s + 97);
			else {
				switch (s + 97) {
				case 123:cout << '.'; break;
				case 124:cout << '?'; break;
				case 125:cout << '!'; break;
				case 126:cout << ' '; break;
				}
			}
		}
		cout << endl;
	}
}

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

int main()
{
	int i, j;
	string s, ans;
	map< pair<char, char>, char > list;
	bool f;
	for (i = 0; i < 5; i++)
		for (j = 0; j < 5; j++)
			list[make_pair('1'+i, '1'+j)] = 'a'+i*5+j;
	list[make_pair('6', '1')] = 'z';
	list[make_pair('6', '2')] = '.';
	list[make_pair('6', '3')] = '?';
	list[make_pair('6', '4')] = '!';
	list[make_pair('6', '5')] = ' ';

	while (getline(cin, s)) {
		ans = "";
		f = true;
		if (s.size()&1) {
			f = false;
			s = "";
		}
		for (i = 0; i < s.size(); i+=2) {
			if ( !list.count( make_pair(s[i], s[i+1]) ) ) {
				f = false;
				break;
			}
			ans += list[make_pair(s[i], s[i+1])];
		}
		if (f) cout<<ans<<endl;
		else cout<<"NA"<<endl;
	}
	return 0;
}

C++: 
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>

#include <algorithm>
#include <complex>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#include <bitset>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
#define strtok_r strtok_s
#endif

#define ITER(c)             __typeof__((c).begin())
#define FOREACH(it, c)      for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define RITER(c)            __typeof__((c).rbegin())
#define RFOREACH(it, c)     for (RITER(c) it=(c).rbegin(); it != (c).rend(); ++it)
#define REP(i, n)           REPEAT(i, 0, n)
#define RREP(i, n)          RREPEAT(i, 0, n)
#define REPEAT(i, k, n)     for(int i = (k); i < (k+n); ++i)
#define RREPEAT(i, k, n)    for(int i = (k)+(n)-1; i >= (k); --i)
#define FROMTO(i,f,t)       for(int i = f; i < t; i++)
#define ALL(c)              (c).begin(), (c).end()
#define LLPOW(p1,p2)        ((ll)pow((double)(p1), (int)p2))
#define ESIZEOF(A)          (sizeof(A)/sizeof((A)[0]))
#define CIN_NO_SYNC         do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0)
#define GETSTR(p)           fgets((p), sizeof(p), stdin)
#define CHOMP(p)            do{ char *_q = (p) + strlen(p)-1; if(*_q == '\n' || *_q == '\r') *_q = 0; } while(0)
#define FILL(m,v)           memset(m, v, sizeof(m))
#define mp                  make_pair
#define pb                  push_back
template<class _T> _T MAX(_T p1,_T p2){return (p1>p2)?p1:p2;} 
template<class _T> _T MIN(_T p1,_T p2){return (p1<p2)?p1:p2;} 
template <class _Tv> inline string join(_Tv &v,string sep=" "){
    ostringstream s;FOREACH(it,v){if(it!=v.begin())s<<sep;s<<*it;};return s.str();
}

typedef long long ll;
typedef unsigned long long ull;

#define X real()
#define Y imag()
typedef double D;
typedef complex<D> P;
#define EPS (1e-9)

#ifdef _DEBUG
template<class _Tv> inline void _prfe(const char *_n,_Tv _c,bool _p=false){
    ITER(_c) _it=_c.begin();
    if(_p){cout<<_n<<" = ["<<endl;for(;_it!=_c.end();++_it)cout<<"    "<<*_it<<endl;cout<<"]"<<endl; }
    else{cout<<_n<<" = [ "<<*_it++;for(;_it!=_c.end();++_it)cout<<", "<<*_it;cout<<" ]"<<endl; }
}
#define pf printf
#define pr(n) do{cout<<#n" = "<<(n)<<endl;}while(0)
#define prfe(n) _prfe(#n, n)
#define prfep(n) _prfe(#n, n, true)
#define dbgchk(n) do{if(n)throw;}while(0)
#else
#define pf(...) /* */
#define pr(...) /* */
#define prfe(...) /* */
#define prfep(...) /* */
#define dbgchk(...) /* */
#endif

char tbl[6][6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};

string solve(string s){
    string r;
    int n = s.length();
    if(n%2) return "NA";
    for(int i = 0; i < n; i += 2){
        if(!isdigit(s[i]) || !isdigit(s[i+1])) return "NA";
        int i1 = s[i]-'0'-1, i2 = s[i+1]-'0'-1;
        if(i1 < 0 || i2 < 0 || i1 >= 6 || i2 >= 5) return "NA";
        r += tbl[i1-1][i2-1];
    }
    return r;
}

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

C++: #include<cstdio>
#include<cstring>
int main(void)
{
	char mozi[5][7];
	//初期化
	strcpy(mozi[0],"afkpuz");
	strcpy(mozi[1],"bglqv.");
	strcpy(mozi[2],"chmrw?");
	strcpy(mozi[3],"dinsx!");
	strcpy(mozi[4],"ejoty ");
	//
	int cnt;
	char snum[]="0123456789";
	char svar[1000];
	
	scanf("%d",&cnt);
	for(int f1=0;f1<cnt;f1++){
		fflush(stdin);
		scanf("%s",svar);
		fflush(stdin);
		if(strlen(svar)%2==1)printf("NA\n");
		else{
			while(svar[0]!='0'){
				int x,y;
				for(int f2=0;f2<10;f2++){
					if(svar[0]==snum[f2]){
						y=f2-1;
					}
					if(svar[1]==snum[f2]){
						x=f2-1;
					}
				}
				//printf("svar->%s\n",svar);
				//printf("x->%d y->%d\n",x,y);
				for(int f=0;f<2;f++){
					for(int f2=0;f2<strlen(svar)-1;f2++){
						svar[f2]=svar[f2+1];	
					}
				}
				svar[strlen(svar)-1]='0';
				svar[strlen(svar)-2]='0';
				printf("%c",mozi[x][y]);
			}
			printf("\n");
		}
	}
	return 0;
}