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 <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==0 || x > 6){return false;}
			if(y==0 || 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();
		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;
		}
	}
}

C++: #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stdexcept>
#include<cmath>
#include<memory>
#include<algorithm>
#include<cstring>
#include<ctime>
#include<deque>
#include<sstream>
#include<iomanip>
#include<sstream>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<climits>
#include<map>
#include<set>
#include<list>
#include<cassert>
#include<deque>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define INF 1<<27
#define all(n) n.begin(),n.end()
#define insert(a,b,c,d) PP(P(a,b),P(c,d))
#define F first
#define S second
#define pb push_back
#define pf push_front
#define LIM 100000
using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> PP;
typedef long long ll;
typedef unsigned long long ull;

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


class AOJ0127{
private:
  string code;
public:

  explicit AOJ0127(string code):code(code){}

  string decode(){
    if((int)code.size()%2 != 0)return "NA";
    rep(i,code.size()){
      if(i%2 == 0){
	if(!('1' <= code[i] && code[i] <='6' ))return "NA";
      }
      else{
	if(!('1' <= code[i] && code[i] <='5' ))return "NA";
      }
    }
    string res;
    for(int i=0;i<code.size();i+=2){
      res += page[(code[i+1]-'0')-1][(code[i]-'0')-1]; 
    }
    return res; 
  }
    
};

int main(){
  string s;
  while(cin >> s){
    AOJ0127 ans(s); 
    cout << ans.decode() << endl;
  }
return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  char table[5][6];
  char c='a';
  for(int j=0;j<5;j++){
    for(int i=0;i<5;i++){
      table[i][j]=c;
      c++;
    }
  }
  table[0][5]='z';table[1][5]='.';table[2][5]='?';table[3][5]='!';table[4][5]=' ';
 
  string s;
  while(cin>>s){
    if(s.size()%2==0){
      cout<<s.size()<<endl;
      for(int i=0;i<s.size();i+=2){
	cout<<table[s[i+1]-'0'-1][s[i]-'0'-1];
      }
      cout<<endl;
    }else{
      cout<<"NA"<<endl;
    }
  }
}

C++: #include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
#include<string>
#include <sstream>
using namespace std;

//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
string str;
char mozi[100];
string d;
int e;
int use;
char i ='a';
int main()
{
  for(int j = 1; j <=6;j++){
    for(int l = 1;l <=5;l++){
      if(j ==6&&l >=2)
	break;
      mozi[j*10+l] =i++;
	 }
      }
    mozi[62] ='.';
    mozi[63] ='?';
    mozi[64] ='!';
    mozi[65] =' ';
  while(cin>>str){
    for(int i = 0;i <str.size();i+=2){
      use = 0;
      d = str.substr(i, 2);
      e =toInt(d);
      if(e >65||e <11){
	cout <<"NA";
	use = e;
	break;
      }
    }
    for(int i = 0;i <str.size();i+=2){
      if(use ==0){
      d = str.substr(i, 2);
      e =toInt(d);
      cout<<mozi[e];
      }
    }
    cout <<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;
    }
        for(int i = 0 ; i < in.size()-1 ; i+=2 ){
	  cout << hyou[in[i+1]-'0'-1][in[i]-'0'-1];
    }
	cout << endl;
  }
  return 0;
}

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)){
        if(strlen(s)%2==1)printf("NA\n");
        else{
            for(int i=0;i<strlen(s);i+=2){
                printf("%c",a[s[i]-48][s[i+1]-48]);

            }
            printf("\n");
        }
        strcpy(s,"");
    }
    return 0;
}

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

string mp[6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! " };

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

        string res = "";
        for(int i=0; i<s.length(); i+=2) {
            if(s[i] >= '7' || s[i] <= '0' || s[i+1] >= '7' || s[i+1] <= '0') {
                cout<<"NA"<<endl;
                goto NEXT;
            }
            res += string(1, mp[s[i]-'1'][s[i+1]-'1']);
        }

        cout<<res<<endl;
    NEXT:;
    }
}