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 <stdio.h>
#include <cmath>
#include <algorithm>
#include <queue>

using namespace std;

char func(int code){
	switch(code){
	case 11:return 'a';
	case 12:return 'b';
	case 13:return 'c';
	case 14:return 'd';
	case 15:return 'e';
	case 21:return 'f';
	case 22:return 'g';
	case 23:return 'h';
	case 24:return 'i';
	case 25:return 'j';
	case 31:return 'k';
	case 32:return 'l';
	case 33:return 'm';
	case 34:return 'n';
	case 35:return 'o';
	case 41:return 'p';
	case 42:return 'q';
	case 43:return 'r';
	case 44:return 's';
	case 45:return 't';
	case 51:return 'u';
	case 52:return 'v';
	case 53:return 'w';
	case 54:return 'x';
	case 55:return 'y';
	case 61:return 'z';
	case 62:return '.';
	case 63:return '?';
	case 64:return '!';
	case 65:return ' ';
	default:return '*';
	}
}


int main(){

	char buf[201],result[101],tmp;
	int p;
	bool NA_FLG;

	while(scanf("%s",buf)!=EOF){
		p = 0;
		NA_FLG = false;

		for(int i=0; buf[i] != '\0';){
			if(buf[i+1] != '\0'){
				tmp = func(10*(buf[i]-'0')+(buf[i+1])-'0');
				if(tmp == '*'){
					NA_FLG = true;
					break;
				}
				result[p++] = tmp;
				result[p] = '\0';
				i += 2;
			}else{
				NA_FLG = true;
				i++;
			}
		}

		if(NA_FLG)printf("NA\n");
		else{
			printf("%s\n",result);
		}
	}

    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include <cstring>
#include<map>
#include<string>
#include<stack>
#include <algorithm>
#include <strstream>
#include<vector>
#include<map>
#include<cmath>
using namespace std;

int main(){
	string s;
	while(cin>>s)
	{
		if(s.size()%2){
			cout<<"NA"<<endl;
			continue;
		}
		for(int i=0; i<s.size() ;i++)
		{
			int k;
			
			if(s[i]>'6' || s[i]<'1' || s[i+1]>'5' || s[i]<'1'){
				cout<<"NA";
				break;
			}
			
			k =  ((int)s[i]-48)*10;
			k += (int)s[i+=1]-48;
			
			if(k==65)cout<<" ";
			else if(k==64)cout<<"!";
			else if(k==63)cout<<"?";
			else if(k==62)cout<<".";
			else{
				if(k<=15){
					char c=k+86;
					cout<<c;
				}
				else if(k<=25){
					char c=k+81;
					cout<<c;
				}
				else if(k<=35){
					char c=k+76;
					cout<<c;
				}
				else if(k<=45){
					char c=k+71;
					cout<<c;
				}
				else if(k<=55){
					char c=k+66;
					cout<<c;
				}
				else cout<<"z";
			}
		}
		puts("");
	}

	return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
  int i;
  int len;
  char str[256];
  string d[10][10];
  d[1][1]="a";
  d[1][2]="b";
  d[1][3]="c";
  d[1][4]="d";
  d[1][5]="e";
  d[2][1]="f";
  d[2][2]="g";
  d[2][3]="h";
  d[2][4]="i";
  d[2][5]="j";
  d[3][1]="k";
  d[3][2]="l";
  d[3][3]="m";
  d[3][4]="n";
  d[3][5]="o";
  d[4][1]="p";
  d[4][2]="q";
  d[4][3]="r";
  d[4][4]="s";
  d[4][5]="t";
  d[5][1]="u";
  d[5][2]="v";
  d[5][3]="w";
  d[5][4]="x";
  d[5][5]="y";
  d[6][1]="z";
  d[6][2]=".";
  d[6][3]="?";
  d[6][4]="!";
  d[6][5]=" ";
  while(fgets(str,256,stdin)!=0){
    str[strlen(str)-1]='\0';
    string s(str),t;
    len=s.length();
    if(len%2)
      cout<<"NA"<<endl;
    else{
      for(i=0;i<len;i+=2){
	if(d[s[i]-'0'][s[i+1]-'0'].empty()){
	  cout<<"NA"<<endl;
	  break;
	}else
	  t+=d[s[i]-'0'][s[i+1]-'0'];
      }
      if(i==len)
	cout<<t<<endl;
    }
  }
  return 0;
}

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

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	string alpha = "abcdefghijklmnopqrstuvwxyz.?! ";
	char table[5][6];

	int t = 0;
	rep(i,6)
	{
		rep(j,5)
		{
			table[j][i] = alpha[t];
			t++;
		}
	}
	
	string s;
	while(cin >> s)
	{
		bool flag = true;

		rep(i,s.size())
		{
			int x = s[i] - '0';
			if( x < 0 || x >= 7) flag = false; 
		}

		if(s.size()%2 != 0 || !flag)
		{
			cout << "NA" << endl;
		}
		else
		{
			t = 0;
			while(true)
			{
				if(t >= s.size())
				{
					break;
				}
			
				int a = s[t] - '1';
				int b = s[t+1] - '1';

				cout << table[b][a]; 
				t += 2;
			}
			cout << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	char graph[6][7] = {{0,0,0,0,0,0,0},
											{0,97,102,107,112,117,122},
											{0,98,103,108,113,118,'.'},
											{0,99,104,109,114,119,'?'},
											{0,100,105,110,115,120,'!'},
											{0,101,106,111,116,121,' '}};
	string s;
	while(cin >> s,!cin.eof()){
		if(s.size() % 2 == 1){cout << "NA" << endl;continue;};
		for(int i = 0;i < s.size();i += 2){
			cout << graph[s[i+1]-'0'][s[i]-'0'];
		}
		cout << endl;
	}	
}

C++: #include <iostream>
using namespace std;
int main(){
	char graph[42] = {0,0,0,0,0,0,0,0,97,102,107,112,117,122,0,98,103,108,113,118,'.',0,99,104,109,114,119,'?',0,100,105,110,115,120,'!',0,101,106,111,116,121,' '};
	string s;
	while(cin >> s,!cin.eof()){
		string ans = "";
		if(s.size() % 2 == 1)ans = "NA";
		else{for(int i = 0;i < s.size();i += 2){
			if(s[i] - '0' <= 0 || s[i+1] - '0' <= 0 || s[i] - '0' > 6 || s[i+1] - '0' > 5){ans = "NA";break;}
			ans += graph[(s[i+1] - '0') * 7 + s[i]-'0'];
		}
		}
		cout << ans << endl;
	}	
}

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 "};
	bool f;
	while (cin >> s)
	{
		if (cin.eof()) break;
		if (strlen(s)%2 == 0)
		{
			for (i = f = 0; i < strlen(s); i += 2, f = 0)
			{
				c = s[i], d = s[i+1];
				if (atoi(&c) > 6 || atoi(&d) > 5)
				{
					cout << "NA" << endl;
					f = 1;
					break;
				}
				r[i/2] = t[atoi(&d)-1][atoi(&c)-1];
			}
			if (f)
				continue;
			r[i/2] = '\0';
			cout << r << endl;
		}
		else
			cout << "NA" << endl;
	}
}

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

int main(){
	int x,y,f;
	string str,t,tmp;
	const char *table[] = {"abcde","fghij","klmno","pqrst","uvwxy","z.?! "};
	while(cin >> str){
		t = "\0";
		f = 1;
		if(str.size() % 2 == 0){
			for(int i = 0;i < str.size();i += 2){
				tmp = str[i];
				x = atoi(tmp.c_str()) - 1;
				tmp = str[i+1];
				y = atoi(tmp.c_str()) - 1;
				if(x > 6 || y > 5 || x == -1 || y == -1){
					cout << "NA" << endl;
					f = 0;
					break;
				}
				t += table[x][y];
			}
			if(f) cout << t << endl;
		}
		else{
			cout << "NA" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
main(){
char g[]={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<<'\n';
}	
}