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;

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(len % 2 == 0)
		{
			
			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 "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;
			if ('0' == st[i] || '7' <= 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 <string>

using namespace std;
char table[7][6];
int main(){
	int i,j,x,y;
	char a,b;
	string str;
	for(i = 1;i <= 6;i++){
		for(j = 1;j <= 5;j++){
			if(i == 1){
				if(j == 1) table[i][j] = 'a';
				else if(j == 2) table[i][j] = 'b';
				else if(j == 3) table[i][j] = 'c';
				else if(j == 4) table[i][j] = 'd';
				else if(j == 5) table[i][j] = 'e';
			}
			else if(i == 2){
				if(j == 1) table[i][j] = 'f';
				else if(j == 2) table[i][j] = 'g';
				else if(j == 3) table[i][j] = 'h';
				else if(j == 4) table[i][j] = 'i';
				else table[i][j] = 'j';
			}
			else if(i == 3){
				if(j == 1) table[i][j] = 'k';
				else if(j == 2) table[i][j] = 'l';
				else if(j == 3) table[i][j] = 'm';
				else if(j == 4) table[i][j] = 'n';
				else table[i][j] = 'o';
			}
			else if(i == 4){
				if(j == 1) table[i][j] = 'p';
				else if(j == 2) table[i][j] = 'q';
				else if(j == 3) table[i][j] = 'r';
				else if(j == 4) table[i][j] = 's';
				else table[i][j] = 't';
			}
			else if(i == 5){
				if(j == 1) table[i][j] = 'u';
				else if(j == 2) table[i][j] = 'v';
				else if(j == 3) table[i][j] = 'w';
				else if(j == 4) table[i][j] = 'x';
				else table[i][j] = 'y';
			}
			else {
				if(j == 1) table[i][j] = 'z';
				else if(j == 2) table[i][j] = '.';
				else if(j == 4) table[i][j] = '!';
				else if(j == 3) table[i][j] = '?';
				else table[i][j] = ' ';
			}
		}
	}
	while(cin >> str){
		if(str.size() % 2 == 0){
			for(i = 0;i < str.size();i+=2){
				a = str[i];
				b = str[i+1];
				x = (int)(a - '0');
				y = (int)(b - '0');
				cout << table[x][y];
			}
			cout << "\n";
		}
		else{
			cout << "NA" << endl;
		}
	}
	return 0;
}

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

int main()
{
	char table[30];
	
	for(int i=0;i<26;i++)
	{
		table[i]='a'+i;
	}
	table[26]='.';
	table[27]='?';
	table[28]='!';
	table[29]=' ';
	
	std::string input,output;
	
	while(1)
	{
		std::cin>>input;
		if(std::cin.eof())break;
		output.erase();
		
		if(input.size()%2==0)
		{
			for(int i=0;i<input.size()-1;i+=2)
			{
				int c=input[i]-'0',r=input[i+1]-'0';
				if(r>5||r<=0||c>6||c<=0)
				{
					output="NA";
					break;
				}
				output+=table[(c-1)*5+r-1];
			}
		}
		else
		{
			output="NA";
		}
		std::cout<<output<<std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main(){
	int sum,x;
	string str;
	char abc[31]={"abcdefghijklmnopqrstuvwxyz.?! "};
	while(cin>>str){
		string ans="";
		int num=0;
		x=str.size();
		if(x%2!=0)cout<<"NA"<<endl;
		else{
			for(int i=0;i<x;i++){
				char c=str[i];
				if(i%2==1){
					if((int)(c-'0')>5){num++;break;}
					sum=sum+(int)(c-'0');
					ans+=abc[sum];
				}else{
					if((int)(c-'0')>6){num++;break;}
					sum=(int)(c-'0');
					sum=(sum-1)*5-1;
				}
			}
			if(num==0){
				cout<<ans<<endl;
			}else{
				cout<<"NA"<<endl;
			}
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <cstring>
#define buf 10000
using namespace std;

int main(void){
  int i,n,m,len;
  char str[buf];

  for( ;fgets(str,sizeof(str),stdin)!=NULL; ){
    len=strlen(str)-1;
    for(i=0;i<len;i+=2){
      if(len%2!=0){
        printf("NA");
        break;}
      n=(str[i]-'0')%48-1;
      m=(str[i+1]-'0')%48-1;
      if(n==5 && m==1)
        printf(".");
      else if(n==5 && m==2)
        printf("?");      
      else if(n==5 && m==3)
        printf("!");
      else if(n==5 && m==4)
        printf(" ");
      else
        printf("%c",'a'+n*5+m);
    }
    printf("\n");
  }
  return 0;
}

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

int main(){
  char zu[8][9];
  string bun;
  char x='a';
  int nagasa;
  int smp1,smp2;
  for(int i=0;i<6;i++){
    for(int j=0;j<5;j++){
      zu[i][j] = x;
      x++;
    }
  }
  zu[5][1]='.';
  zu[5][2]='?';
  zu[5][3]='!';
  zu[5][4]=' ';
  while(cin >> bun){
    nagasa = bun.size();
    int flag=0;
    for(int i=0;i<nagasa;i=i+2){
      smp1 = bun[i]-'0'-1;
      smp2 = bun[i+1]-'0'-1;
      if(smp1 > 5 || smp2 > 4){
	flag = 1;
      }
    }
    int a = nagasa%2;
    if(a == 0 && flag == 0){
      for(int i=0;i<nagasa;i=i+2){
	smp1 = bun[i]-'0'-1;
	smp2 = bun[i+1]-'0'-1;
	cout << zu[smp1][smp2];
      }
      cout << endl;
    }
    else{
    cout << "NA" << endl;
    }
  }
}