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

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
	string st;
	while (getline(cin,st)) {
		string ans;
		bool ok = true;
		if (st.size() % 2)ok = false;
		for (int i = 0; i < st.size() / 2; ++i) {
			string ast = st.substr(2 * i, 2);
			int num = (ast[0] - '1') * 5 + (ast[1] - '1');
			if (0<=num&&num <= 25)ans += 'a' + num;
			else if (num == 26)ans += '.';
			else if (num == 27)ans += '?';
			else if (num == 28)ans += '!';
			else if (num == 29)ans += " ";
			else {
				ok = false;
				break;
			}
		}
		if (ok) {
			cout << ans << endl;
		}
		else {
			cout << "NA" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <queue>
#include <vector>
#include <sstream>
#include <functional>
using namespace std;
char table[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','.','?','!',' '},
};
int main()
{
	string s;
    while(cin>>s){
		if(!(s.length()%2)){
			for(int i=0;i<(int)s.length();i+=2){
				if(1<=s[i]-'0'&&s[i]-'0'<=6&&1<=s[i+1]-'0'&&s[i+1]-'0'<=5){
					cout<<table[s[i]-'0'-1][s[i+1]-'0'-1];
				}else{
					cout<<"NA";
					break;
				}
			}
		}else{
			cout<<"NA";
		}
		cout<<endl;
	}
    return 0;
}

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

string hyou[] = {"afkpuz",
		 "bglqv.",
		 "chmrw?",
		 "dinsx!",
		 "ejoty "};
int main(){
  string in;
  while(cin >> in){
    if(in.size()%2 == 1){
      cout << "NA" << endl;
      continue;
    }
        for(int i = 0 ; i < in.size() ; i+=2 ){
	  cout << hyou[in[i+1]-'0'-1][in[i]-'0'-1];
    }
	cout << endl;
  }
  return 0;
}

C++: #include <iostream> 
#include <vector>
using namespace std;
int main(){
  char m = 'a';
  vector<char> str(31);
  for(int i = 1;i < 26;i++){
    str[i] = 'a' + i-1;
  }
  str[27] = '.';
  str[28] = '?';
  str[29] = '!';
  str[30] = ' ';
  string line;
  while(cin >> line){
    if(line.size()%2 != 0){
      cout << "NA" << endl;
      continue;
    }
    for(int i = 0;i < line.size();i+=2){
      int tmp = (line[i+1]-'0')+((line[i]-'0'-1)*5);

      cout << str[tmp];
    }
    cout << endl;
  }


  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
    char field[6][11];
    char a='a';
    for(int i=1; i < 7; i++){
        for(int j=1; j < 6; j++){
            field[j][i] = a;
            a++;
        }
    }
    field[2][6] = '.'; field[3][6] = '?'; field[4][6] = '!'; field[5][6] = ' ';

    string input;
    while(cin >> input){
        if(input.size()%2 == 1) {
            cout << "NA" << endl;
            continue;
        }
        for(int i=0; i < input.size(); i+=2){
            int n = atoi(input.substr(i, 1).c_str());
            int m = atoi(input.substr(i+1, 1).c_str());

            cout << field[m][n];
        }
        cout << endl;
    }
}

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

int main() {
	string s;
	while (cin >> s) {
		if (s.size() % 2) { puts("NA"); continue; }
		string res;
		int pos = 0;
		while (pos + 1 < s.size()) {
			int d = stoi(to_string(s[pos] - 48) + to_string(s[pos + 1] - 48));
			if (d <= 10 || 65 < d) { puts("NA"); goto p; }
			else if (10 < d&&d <= 15)res += (char)d + 86;
			else if (20 < d&&d <= 25)res += (char)d + 81;
			else if (30 < d&&d <= 35)res += (char)d + 76;
			else if (40 < d&&d <= 45)res += (char)d + 71;
			else if (50 < d&&d <= 55)res += (char)d + 66;
			else if (d == 61)res += 'z';
			else if (d == 62)res += '.';
			else if (d == 63)res += '?';
			else if (d == 64)res += '!';
			else if (d == 65)res += ' ';
			else { puts("NA"); goto p; }
			pos += 2;
		}
		cout << res << endl;
	p:;
	}
}

C++: #include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    string s, ans;
    while(cin >> s){
        int i = 0;
        char a;
        ans = "";
        while(i < s.size()){
            if(s.size() % 2 || (s[i] > '6' || s[i + 1] > '5')){
                ans = "NA";
                break;
            }
            if(s[i] == '1'){
                a = ('a' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '2'){
                a = ('f' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '3'){
                a = ('k' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '4'){
                a = ('p' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '5'){
                a = ('u' - 1) + (s[i + 1] - '0');
            }else if(s[i] == '6'){
                if(s[i + 1] == '1')
                    a = 'z';
                else if(s[i + 1] == '2')
                    a = '.';
                else if(s[i + 1] == '3')
                    a = '?';
                else if(s[i + 1] == '4')
                    a = '!';
                else if(s[i + 1] == '5')
                    a = ' ';
            }
            ans+= a;
            i+= 2;
        }
        cout << ans << endl;
    }
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>

using namespace std;

int main() {
	char h[6][6]={"abcde","fghij","klmno","pqrst","uvwxy","z.?! "},c[202];
	int i,n;
	while(cin >> c) {
    n=strlen(c);
	for (i=0;i<n-1;i+=2) if (c[i]<'1' || c[i]>'6' || c[i+1]<'1' || c[i+1]>'5') break;
	if ((n % 2!=0) || (i!=n)) { cout << "NA" << endl; continue;} 
	for (i=0;i<n-1;i+=2) cout << h[c[i]-'0'-1][c[i+1]-'0'-1];
	cout << endl;
	}
 return 0;
}

C++: /*
	0127:Pocket Pager Input
*/
#include	<iostream>
#include	<string>

using namespace std;

const char WORDS[30] = "abcdefghijklmnopqrstuvwxyz.?! ";

int main(void) {
	char WORDSET[6][5];
	int w = 0;
	
	for(int i = 0; i < 6; i++) {
		for(int j = 0; j < 5; j++) {
			WORDSET[i][j] = WORDS[w];
			w++;
		}
	}
	
	while(1) {
		string str;
		
		cin >> str;
		if( cin.eof() ) { break; }
			else if( (int)str.size() % 2 != 0 ) { cout << "NA" << endl; continue; }
		string::iterator it = str.begin();
		while( it != str.end() ) {
			int a, b;
			
			a = *it - '0' - 1;
			it++;
			b = *it - '0' - 1;
			it++;
			
			cout << WORDSET[a][b];
		}
		cout << endl;
	}
	return 0;
}