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<string.h>


int main(){
	char out[300],in[300];
	int i,j,a,b;
	
	while(~scanf(" %s ",in)){
		i=0;
		j=0;
		for(i=0;;i++){
			if(in[i]=='\0')break;
			if(i%2==1 && in[i]>'5')j=1;
			if(in[i]<='0' || in[i]>'6')j=1;
		}
		
		if(i%2==1 || j==1){
			printf("NA\n");
			continue;
		}
		
		for(i=0;;i+=2){
			if(in[i]=='\0')break;
			if(in[i]=='6'){
				switch(in[i+1]){
				case '1':
					out[j]='z';
					break;
				case '2':
					out[j]='.';
					break;
				case '3':
					out[j]='?';
					break;
				case '4':
					out[j]='!';
					break;
				case '5':
					out[j]=' ';
					break;
				}
			}else{
				out[j]=(in[i]-'1')*5+in[i+1]-'1'+'a';
			}
			++j;
			out[j]='\0';
		}
		printf("%s\n",out);
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

char c[]={'z','.','?','!',' '};
string s;

int main(){
	while(cin>>s){
		int l=s.size();
		if(l%2){cout<<"NA"<<endl;continue;}
		int cur=0,f=0;
		string ans="";
		while(cur<l){
			int a=s[cur++]-'0',b=s[cur++]-'0';
			if(a<1||a>6||b<1||b>5){cout<<"NA"<<endl;f=1;continue;}
			if(a<6)ans+=(char)('a'+(a-1)*5+b-1);
			if(a==6)ans+=c[b-1];
		}
		if(!f)cout<<ans<<endl;
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	string a="abcdefghijklmnopqrstuvwxyz.?! ";
	string b;
	while(cin>>b){
		string f="";
		if(b.length()%2==1) {
			cout<<"NA"<<endl;
			goto stop;
		}
		for(int i=0;i<b.length();i+=2){
			int c,d;
			c=(int)b[i]-'0';
			d=(int)b[i+1]-'0';
			if(c>6||d>5||c<1||d<1) {
				cout<<"NA"<<endl;
				goto stop;
			}
			c--;
			int e=c*5+d;
			f+=a[e-1];
		}
		cout<<f<<endl;
		stop:;
	}
}

C++: #include <stdio.h> // C++???????????????
#include <string.h> // c++???????????????
#include <math.h> // c++???????????????
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
using namespace std;

typedef long long int lli;
#define PI 3.1415926535897932
#define N 100
#define MAX(a,b) ((a>b)?(a):(b)) // ?????§????????????
#define MIN(a,b) ((a<b)?(a):(b)) // ????°?????????????
#define INRANGE(a,b,c) ((a<=b&&b<=c)?(1):(0)) // a<=b<=c??????????????????????????????


void swap(int &a, int &b) { // c??????*
	int w = a;
	a = b;
	b = w;
}

int getdigit(int num) { // ??´??°????????°?????????
	int i, j;
	if (num<0) num *= -1; // ?????°???????????¢
	if (num == 0)return 1;
	for (i = 10, j = 1;; i *= 10, j++) {
		if (INRANGE(i / 10, num, i - 1))return j;
	}
	return 0; // ????????¨??????
}

int getN(int num, int digit) {
	int i = 1, j;
	for (j = 1; j<digit; i *= 10, j++);
	return (num / i) % 10;
}

int zeller(int y, int m, int d) { // 0????????\????????§??????
	if (m<3) { y--; m += 12; }
	return (y + y / 4 - y / 100 + y / 400 + (13 * m + 8) / 5 + d) % 7;
}

int gcd(int a, int b) {	// ?????§??¬?´???°
	if (b == 0) return a;
	return gcd(b, a%b);
}

int lcm(int a, int b) {	// ????°???¬?????°
	return a*b / gcd(a, b);
}

int stoi(const string str) { // ?????????????????´??°
	int i = 0, j;
	int len = str.length();
	int w = 0;
	for (i = 1, j = 1; i <= len && INRANGE('0', str[len - i], '9'); i++, j *= 10) {
		w += (str[len - i] - '0')*j;
	}
	if (str[0] == '-')w *= -1;
	return w;
}

string itos(int a) { // ??´??°???????????????
	int i;
	string str = "";
	int keta;
	if (a<0) { str += '-'; a *= -1; } // ?????°??????????????????
	for (keta = 10; a / keta != 0; keta *= 10);
	for (i = keta / 10; i != 0; i /= 10) {
		str += ((a / i) % 10) + '0';
	}
	return str;
}

char kaezi[100][100] = { {"XXXXXXX"},{"Xabcde"},{"Xfghij"},{"Xklmno"},{"Xpqrst"},{"Xuvwxy"},{"Xz.?! "} };

int main(void) {
	string str;
	string det;
	int i, j;
	while (cin>>str) {
		det = "";
		for (i = 0; i < str.length(); i+=2) {
			if (str.length() % 2 == 1) { det = "NA"; break; }
			if (INRANGE('1', str[i], '6') && INRANGE('1', str[i + 1], '5')) {
				det += kaezi[str[i] - '0'][str[i + 1] - '0'];
			}
			else {
				det = "NA"; break;
			}
		}
		cout << det << 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){
    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<string>
#include<iostream>

using namespace std;

int main()
{
	char code[]="abcdefghijklmnopqrstuvwxyz.?! ";
	string s;
	while(cin>>s){
		if(s.length()%2==1)	cout<<"NA";
		else{
			for(int i=0;i<s.length();i+=2){
				int c=s[i]-'0'-1,r=s[i+1]-'0'-1;
				if(0<=c && c<=5 && 0<=r && r<=4){
					cout<<code[c*5+r];
				}
				else{
					cout<<"NA";
					break;
				}
			}
		}
		cout<<endl;
	}

	return 0;
}

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

char buf[300];
int main() {
	while (~scanf("%s", buf)) {
		char*s = buf;
		string res;
		while (s < buf + strlen(buf)) {
			int d; sscanf(s, "%2d", &d);
			if (d <= 10 || 65 < d) { puts("NA"); goto p; }
			if (d <= 15)res += char(d + 86);
			else if (d <= 25)res += char(d + 81);
			else if (d <= 35)res += char(d + 76);
			else if (d <= 45)res += char(d + 71);
			else if (d <= 55)res += char(d + 66);
			if (d == 61)res += 'z';
			if (d == 62)res += '.';
			if (d == 63)res += '?';
			if (d == 64)res += '!';
			if (d == 65)res += ' ';
			s += 2;
		}
		cout << res << endl;
	p:;
	}
}

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;
}