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 "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(); ++i) {
			if (!isdigit(st[i]))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 <cstdio>
using namespace std;

const string hyou[] = {"afkpuz",
		       "bglqv.",
		       "chmrw?",
		       "dinsx!",
		       "ejoty "};
int main(){
  string in;
  while(cin >> in){
    cin.ignore();
    if(in.size()%2 == 1){
      cout << "NA" << endl;
      continue;
    }
    bool flag = true;
    string ans = "";
        for(int i = 0 ; i < in.size()-1 ; i+=2 ){
	  if(!('1' <= in[i+1] && in[i+1] <= '5')||
	     !('1' <= in[i] && in[i] <= '6')){
	    flag = false; 
	    break;
	  }
	  ans += hyou[in[i+1]-'0'-1][in[i]-'0'-1];
    }
	if(flag)cout << ans <<endl;
	else cout << "NA" << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
int main()
{
	int i;
	char c, d, s[201], r[101], t[5][7] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
	while (cin >> s)
	{
		if (cin.eof()) break;
		if (strlen(s)%2 == 0)
		{
			for (i = 0; i < strlen(s); i += 2)
			{
				c = s[i], d = s[i+1];
				if (atoi(&c) > 6 || atoi(&d) > 5)
				{
					cout << "NA" << endl;
					break;
				}
				r[i/2] = t[atoi(&d)-1][atoi(&c)-1];
			}
			if (atoi(&c) > 6 || atoi(&d) > 5)
				continue;
			r[i/2] = '\0';
			cout << r << endl;
		}
		else
			cout << "NA" << endl;
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  string str[6]={"","aafkpuz","abglqv.","achmrw?"
		 ,"adinsx!","aejoty "};
  string str2;
  while(cin>>str2){
    if(str2.size()%2==1)
      cout<<"NA"<<endl;
    else{
      string ans="";
      for(int i=0;i<str2.size();i+=2){
	if(str2[i+1]-'0'<=5&&str2[i]-'0'<=6&&str2[i+1]-'0'>=0&&str2[i]-'0'>=0){
	ans+=str[str2[i+1]-'0'][str2[i]-'0'];
	}
	else{
	  ans="NA";
	}
      }
      cout<<ans<<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()){
a="";
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 <algorithm>
#include <iostream>
#include <vector>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

using namespace std;

//テ」ツδ榲」ツつッテ」ツδュテ・ツョツ堙ァツセツゥ
#define ALL(v) (v).begin(),(v).end()
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
#define REP(i,a,b) for(int i=(int)(a); i<(int)(b); ++i)
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define SORT(x) sort(begin(x),end(x))
#define SELECT_SORT(x, n) sort(begin(x),begin(x)+n)
#define SWAP(type, a, b) do {type tmp = a; a = b; b = tmp;} while (0)
#define rep_split(tok,a_str,re) for(char *tok = strtok((char *)a_str.c_str(),re); tok != NULL; tok = strtok(NULL,re))

//テ・ツョツ堙ヲツ閉ー
#define INF 2000000000000
#define MAX 10

//DEBUGテァツ板ィ
#define BAR() cout << "----------------------------" << endl;
#define DUMP(v) (cerr << #v << ": " << v << endl)
#define PRINT(list) cout << "{ "; for(auto nth : list){ cout << nth << " "; } cout << "}" << endl;

bool check(string input){
	int len = input.length();
	if(len % 2 == 0)
	{
		
		for(int i=0; i<len; i+=2)
		{
			int x = input[i] - '0';
			int y = input[i+1] - '0';
			if(x > 6){return false;}
			if(y > 5){return false;}
		}
		return true;
	}else{
		return false;
	}
}

int main()
{
	string table[10][10] = {{},
		                 {" ", "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 input="0";
	while(input != "153414")
	{
		cin >> input;
		int len = input.length();
		//DUMP(check(input));
		if(check(input))
		{
			
			for(int i=0; i<len; i+=2)
			{
				int x = input[i] - '0';
				int y = input[i+1] - '0';
				cout << table[x][y];
			}
			cout << endl;
		}
		else{
			cout << "NA" << endl;
		}
	}
}