Go: package main

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

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])
			ret = append(ret, table[row-1][col-1])
		}
		fmt.Println(strings.Join(ret, ""))
	}
}

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

int main(void)
{
	int n;
	string instr;

	while(cin >> instr, !cin.eof()){
		if(instr.length() % 2){
			cout << "NA" << instr.length() << endl;
			continue;
		}
		bool cannot = false;
		for(int i = 0; i < instr.length()-1; i+= 2){
			if(instr[i] < '1' || instr[i] > '6' || instr[i+1] < '1' || instr[i+1] > '5'){
				cannot = true;
				break;
			}
		}
		if(cannot){
			cout << "NA" << endl;
			continue;
		}
		for(int i = 0; i < instr.length()-1; i+=2){
			int a = instr[i]-'0', b = instr[i+1]-'0';
			int c = b+(a-1)*5;
			if(c <= 26)
				cout << (char)(c - 1+'a');
			else {
				switch(c%26){
					case 1:
						cout << '.';
						break;
					case 2:
						cout << '?';
						break;
					case 3:
						cout << '!';
						break;
					default:
						cout << ' ';
						break;
				}
			}

		}
		cout << endl;
			
	}

	return 0;
}

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

int main() {
	string a;
	while (cin >> a) {
	k:;
		if (a.length() % 2) { 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 <string>
#include <map>

using namespace std;

void solve()
{
	map<int, char> Map;
	Map[11] = 'a'; Map[12] = 'b'; Map[13] = 'c'; Map[14] = 'd'; Map[15] = 'e';
	Map[21] = 'f'; Map[22] = 'g'; Map[23] = 'h'; Map[24] = 'i'; Map[25] = 'j';
	Map[31] = 'k'; Map[32] = 'l'; Map[33] = 'm'; Map[34] = 'n'; Map[35] = 'o'; 
	Map[41] = 'p'; Map[42] = 'q'; Map[43] = 'r'; Map[44] = 's'; Map[45] = 't'; 
	Map[51] = 'u'; Map[52] = 'v'; Map[53] = 'w'; Map[54] = 'x'; Map[55] = 'y'; 
	Map[61] = 'z'; Map[62] = '.'; Map[63] = '?'; Map[64] = '!'; Map[65] = ' '; 
	string str;
	while(cin >> str)
	{
		int size = str.size();
		if(size % 2)
		{
			cout << "NA" << endl;
		}
		else
		{
			bool flag = true;
			for(int i = 0; i < size; i += 2)
			{
				if(str[i] > '6' || str[i] < '1' || str[i + 1] > '5' || str[i + 1] < '1')
				{
					flag = false;
				}
			}
			if(flag)
			{
				for(int i = 0; i < size; i += 2)
				{
					int temp = (str[i] - '0') * 10 + str[i + 1] - '0';
					cout << Map[temp];
				}
			}
			else
			{
				cout << "NA";
			}
			cout << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
long l,i,k,f;
string s,t;
while(cin>>s){
l=s.size();t="";f=0;
for(i=0;i<l;i+=2){
if(49>s[i]||s[i]>54||49>s[i+1]||s[i+1]>53){f=1;break;}
k=(s[i]-48)*5+91+(s[i+1]-48);
/*cout<<"k="<<k<<endl;*/
if(s.substr(i,2)=="62")k=46;
else if(s.substr(i,2)=="63")k=63;
else if(s.substr(i,2)=="64")k=33;
else if(s.substr(i,2)=="65")k=32;
t+=k;
}
if(f==0)cout<<t<<endl;
else cout<<"NA"<<endl;
}
return 0;
}

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

using namespace std;

int main(void){

  string s;

  char h[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','.','?','!',' ' };

  while( cin >> s ){

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

    int x[200],y[200],I = 0;
    for( int i = 0 ; i < l ; i += 2 ){
      x[I] = s[i] - '0';
      y[I] = s[i + 1] - '0';
      if( x[I] > 6 || y[I] > 5 ){
	cout << "NA";
	continue;
      }
      else{
	x[I]--;
	y[I]--;
      }
      I++;
    }
    for( int i = 0 ; i < I ; i++ ){
      cout << h[x[i]][y[i]];
    }
    cout << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vvc vector<vector<char>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
typedef pair<int, int> pii;
#define MAX 99999999
int main(){
    char u[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 flag=true;
        if(s.length()%2){cout<<"NA"<<endl; flag=false;}
    if(flag){
    vector<pii>v(1000);
    rep(i,s.length()/2){
        v[i]=pii(s[2*i]-48,s[2*i+1]-48);
        if(v[i].first>6||v[i].second>5||v[i].first<=0||v[i].second<=0){cout<<"NA"<<endl;goto E;}
    }
    rep(i,s.length()/2)
    cout<<u[v[i].first-1][v[i].second-1];
    cout<<endl;
    }
    E:;
        s.clear();
    }
}

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{
            if(!flg){
                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>
using namespace std;

const string characters = "abcdefghijklmnopqrstuvwxyz.?! ";

string convert(const string &number) {
	if(number.size() & 1) return "NA";

	string res = "";
	for(unsigned i = 0; i < number.size(); i += 2) {
		const unsigned idx = (number[i] - '1') * 5 + (number[i + 1] - '1');

		if(idx >= characters.size()) return "NA";

		res += characters[idx];
	}

	return res;
}

int main() {
	string number;
	while(cin >> number) {
		cout << convert(number) << endl;
	}

	return EXIT_SUCCESS;
}