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 <vector>
#include <list>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <cstdio>
#include <climits>
#include <complex>
#include <cstdint>
#include <tuple>

#define M_PI       3.14159265358979323846

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }
inline int readInt() { int x; scanf("%d", &x); return x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;

//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define SQ(a) ((a)*(a))
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,s,n) for(int i=s;i<(int)n;++i)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
struct Edge {
    int to, cost;
    Edge(int to, int cost): to(to), cost(cost) {}
};

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<Edge>> AdjList;
AdjList graph;

const int INF = 100000000;

int main() {
    //cout << fixed << setprecision(15);

    map<pair<int, int>, char> mp;

    for(int i=0; i<6; ++i){
        for(int j=0; j<6; ++j){
            mp[{i+1, j+1}] = ('a' + i*5+j);
        }
    }
    mp[{6, 1}] = 'z';
    mp[{6, 2}] = '.';
    mp[{6, 3}] = '?';
    mp[{6, 4}] = '!';
    mp[{6, 5}] = ' ';


    string s;
    while(cin >> s){
        if((int)s.size()%2==1) {
            cout << "NA" << endl;
            continue;
        }

        for(int i=0; i<s.size(); i+=2){
            cout << mp[{s[i]-'0', s[i+1]-'0'}];
        }
        cout << endl;
    }
    return 0;
}

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

using namespace std;

int main(int argc, char const* argv[])
{
	string data;
	string output;

START:
	while( cin >> data ){
		output.clear();
		if( data.size() % 2 ){
			cout << "NA" << endl;
			continue;
		}

		for( int i = 0;i < data .size() / 2;i++ ){
			int j = i * 2;
			data[j] -= '0';
			data[j + 1] -= '0';
			if( data[j] < 1 || data[j + 1] < 1 || data[j] > 6 || data[j + 1] > 5 ){
				cout << "NA" << endl;
				goto START;
			}
			if( data[j] == 6 && data[j + 1] > 1 ){
				if( data[j + 1] == 2 ) output.append(1,'.');
				else if( data[j + 1] == 3 ) output.append(1,'?');
				else if( data[j + 1] == 4 ) output.append(1,'!');
				else if( data[j + 1] == 5 ) output.append(1,' ');
			} else {
				char a = ( data[j] - 1 ) * 5 + data[j + 1] - 1 + 'a';
				output.append(1,a);
			}
		}
		cout << output <<  endl;
	}


	
	return 0;
}

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

int main()
{
	string table[6] = { "abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! " };
	string s;
	int a,b;
	while (cin>>s)
	{
		int flg = 1;
		string ans;
		if (s.size()%2)		//??????????????????????\???°?????´???
		{
			cout << "NA" << endl;
		}
		else
		{
			for (int i = 0; i < s.size(); i += 2)
			{
				if ((s[i] < '1') || (s[i] > '6') || (s[i + 1] < '1') || (s[i + 1] > '5'))
				{
					flg = 0;		//??????????????????????????§???????????´???
				}
			}

			if (flg)
			{
				for (int i = 0; i < s.size(); i+=2)		//????????????????????¨????????????????????´???
				{
					a = s[i] - '0'-1;
					b = s[i + 1] - '0'-1;
					ans += table[a][b];
				}
				cout << ans <<endl;
			}
			else
			{
				cout << "NA" <<endl;
			}
		}
	}

	return 0;
}

C++: #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);}

char maze[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',' '}
  };

int main(void){
  string in;
  while(cin>>in){
    string out;
    if(in.size()%2==0){
      rep(i,in.size()){
  if(in[i] == '\n')break;
	out += maze[in[i+1]-'0'-1][in[i]-'0'-1];
	i ++;
      }
      cout<<out<<endl;
    }else
      cout<<"NA"<<endl;
  }
}

C++: #include <cstdio>
#include <string.h>
using namespace std;

int main()
{
	char change[6][6] = {
		"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "
	};
	
	char str[256];
	
	while (scanf("%s", str) != EOF){
		char str2[256];
		strcpy(str2, "");
		
		int i = 0;
		while (str[i] != '\0'){
			if (
			(str[i] < '1' || str[i] > '6') || 
			(str[i + 1] < '1' || str[i + 1] > '5')
			){
				strcpy(str2, "NA");
				break;
			}
						
			strncat(str2, &change[str[i] - '0' - 1][str[i + 1] - '0' - 1], 1);
			
			i += 2;
		}
		
		printf("%s\n", str2);
	}
	
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<stdlib.h>
using namespace std;
int main()
{
	string po[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', ' ' } };
	string s;

	while (cin >> s){
		if (s.size() % 2 == 1){
			cout << "NA" << endl;
		}
		else{
			for (int i = 0; i < s.size(); i += 2){
				string x, y;
				x = s[i + 1];
				y = s[i];
				cout << po[stoi(x)][stoi(y)];
			}
		}
cout<<endl;
	}
}

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

int main(){
    char map[6][5] = {
	{'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', '.', '?', '!', ' '}};

    string s;
    while (cin >> s){
	bool err = false;
	for (int i = 0; i < s.size(); i++)
	    if (i % 2 && (s[i] > '5' || s[i] < '1')) err = true;
	    else if (i % 2 == 0 && (s[i] > '6' || s[i] < '1')) err = true;

	if (s.size() % 2 || err) cout << "NA" << endl;

	else for (int i = 0; i < s.size(); i+=2)
		 cout << map[s[i]-'0'-1][s[i+1]-'0'-1], cout << endl;
    }
}