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<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;

int main(){
    char l[6][6]={{0}};
    for(int i=0;i<5;i++){
        for(int j=0;j<5;j++)
            l[i][j]='a'+i*5+j;
    }
    strcpy(l[5],"z.?! ");
 
    char str[256];
    while(scanf("%s",str)!=EOF){
        if(strlen(str)&1){
            puts("NA");
            continue;
        }
        bool flag=true;
        char ans[128]={0};
        for(int i=0;str[i];i+=2){
            int v1=str[i]-'0'-1,v2=str[i+1]-'0'-1;
            if(v1<0||v1>=6||v2<0||v2>=5){
                puts("NA");
                flag=false;
                break;
            }
            ans[i/2]=l[v1][v2];
        }
        if(flag)printf("%s\n",ans);
    }
    return 0;
}

C++: #include <iostream>

#include <vector>

#include <algorithm>

#include <sstream>

#include <string>

#include <cmath>

#include <list>

#include <set>
#include <cstdlib>
using namespace std;

int in() {int x; cin >> x; return x;}

template <typename T> class SegTree

{

public:

	int n;

	T T_max;

	vector<T> dat;

	SegTree(int n_, T t_max)

	{

		int n = 1;

		T_max = t_max;

		while (n < n_)n *= 2;

		for (int i = 0; i < 2 * n - 1; i++)dat.push_back(t_max);

	}

	void update(int k, T a)

	{

		k += n - 1;

		dat[k] = a;

		while (k > 0)

		{

			k = (k - 1) / 2;

			dat[k] = min(dat[k * 2 + 1], dat[k * 2 + 2]);

		}

	}



	//[a,b)

	T query(int a, int b)

	{

		return _query(a, b, 0, 0, n);

	}



private:

	T _query(int a, int b, int k, int l, int r)

	{

		if (r <= a || b <= l)return T_max;

		if (a <= l && r <= b)return dat[k];

		else

		{

			T vl = _query(a, b, k * 2 + 1, l, (l + r) / 2);

			T vr = _query(a, b, k * 2 + 2, (l + r) / 2, r);

			return min(vr, vl);

		}

	}

};

int main()
{
	string a = " abcdefghijklmnopqrstuvwxyz.?! ";
	string b;
	while (cin >> b)
	{
		string ans;
		if (b.size() % 2)
		{
			cout << "NA" << endl;
			continue;
		}
		for (int i = 0; i < b.size(); i += 2)
		{
			int A = b[i] - '0';
			int B = b[i + 1] - '0';
			A--;
			int C = A * 5 + B;
			if (C > 30)
			{
				ans = "NA";
				break;
			}
			ans += a[C];
		}
		cout << ans << endl;
	}
}

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

const char symbol[4] = { '.', '?', '!', ' ' };

int main()
{
	std::string s;
	while( std::cin >> s )
	{
		if( s.size() & 1 )
			std::cout << "NA" << std::endl;
		else
		{
			std::string res;
			bool f = true;

			for( int i = 0; i < s.size(); i += 2 )
			{
				if( s[i] < '1' || s[i] > '6' || s[i+1] < '1' || s[i+1] > '5' )
				{
					f = false; 
					break;
				}

				int n = ( s[i] - '1' ) * 5 + s[i+1] -'1';
	
				if( n > 29 )
				{
					f = false;
					break;
				}
				else
					res += n >= 26 ? symbol[n-26] : 'a' + n;
			}

			std::cout << ( f ? res : "NA" ) << std::endl;
		}
	}

	return 0;
}

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

char pbel(string x) {
	if (x == "11")return 'a';
	else if (x == "12")return 'b';
	else if (x == "13")return 'c';
	else if (x == "14")return 'd';
	else if (x == "15")return 'e';
	else if (x == "21")return 'f';
	else if (x == "22")return 'g';
	else if (x == "23")return'h';
	else if (x == "24")return 'i';
	else if (x == "25")return 'j';
	else if (x == "31")return 'k';
	else if (x == "32")return 'l';
	else if (x == "33")return 'm';
	else if (x == "34")return 'n';
	else if (x == "35")return 'o';
	else if (x == "41")return'p';
	else if (x == "42")return'q';
	else if (x == "43")return'r';
	else if (x == "44")return's';
	else if (x == "45")return't';
	else if (x == "51")return'u';
	else if (x == "52")return'v';
	else if (x == "53")return 'w';
	else if (x == "54")return'x';
	else if (x == "55")return'y';
	else if (x == "61")return'z';
	else if (x == "62")return'.';
	else if (x == "63")return'?';
	else if (x == "64")return'!';
	else if (x == "65")return' ';
	else return'+';
}

int main() {
	string s;
	while (cin >> s) {
		string pr;
		int a = s.size();
		int flg = 0;

		if (a % 2 == 0) {
			for (int i = 0;i < a;i += 2) {
				string sa;
				sa += s[i];
				sa += s[i + 1];
				if (pbel(sa) == '+') {
					flg = 1;
					break;
				}
				else {
					pr += pbel(sa);
				}
			}
		}
		else { flg = 1; }

		if (flg == 1)cout << "NA" << endl;
		else cout << pr << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
main(){
char g[42]={97,102,107,112,117,122,98,103,108,113,118,46,99,104,109,114,119,63,100,105,110,115,120,33,101,106,111,116,121,32};
string s,a;
while(cin>>s,!cin.eof()){
for(int i=0;i<s.size();i+=2){
int l=s[i]-'0',r=s[i+1]-'0';
if(s.size()%2||l<1||r<1||l>6||r>5){a="NA";break;}
a+=g[r*6+l-7];
}
cout<<a<<endl;
}	
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

signed main() {
	string A[] = { "abcde","fghij","klmno","pqrst","uvwxy","z.?! " };
	for (string s; cin >> s;) {
		if (s.size() % 2) {
			cout << "NA" << endl;
			continue;
		}
		bool flag = false;
		string ans = "";
		for (int i = 0; i < s.size(); i += 2) {
			if (s[i] > '6' || s[i + 1] > '5') {
				cout << "NA" << endl;
				flag = true;
				break;
			}
			ans += A[s[i] - '1'][s[i + 1] - '1'];
		}
		if (flag) {
			continue;
		}
		cout << ans << endl;
	}
	return 0;
}