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 <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)

int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

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

int main(void){
  string in;
  while(cin>>in){
    //cout<<in.size()<<endl;
    if(in.size()%2==0){
      rep(i,in.size()){
	cout<<maze[in[i+1]-'0'-1][in[i]-'0'-1];
	i ++;
      }
      cout<<endl;
    }else
      cout<<"NA"<<endl;
  }
}

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


int main(){
	char g[42] = {0,0,0,0,0,0,0,0,97,102,107,112,117,122,0,98,103,108,113,118,46,0,99,104,109,114,119,63,0,100,105,110,115,120,33,0,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 * 7 + l];
		}
		cout << a << endl;
	}	
}

C++: #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <stack>
#include <queue>
 
using namespace std;
 
#define pb(n)	push_back(n)
#define mp(n,m) make_pair(n,m)
#define fi 	first
#define se 	second
#define all(r) (r).begin(),(r).end()

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
const int IMAX=((1<<30)-1)*2+1;
const double EPS=1e-10;
//int mod=1000000007

char change(int a){
	if(a<26)return a+'a';
	if(a==26)return '.';
	if(a==27)return '?';
	if(a==28)return '!';
	if(a==29)return ' ';
	return 0;
}



int main(){
	int a,b;
	string s;
	char c;
	while(cin>>s){
		string t;
		bool f=true;
		if(s.size()%2!=0)f=false;
		else{
			for(int i=0; i<s.size(); i+=2){
				a=s[i]-'1';
				b=s[i+1]-'1';
				if(a>5||b>4){
					f=false;
					break;
				}
				t+=change(a*5+b);
			}
		}
		cout<<(f?t:"NA")<<endl;
	}
	
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

string enc[5] = {"afkpuz","bglqv.","chmrw?","dinsx!","ejoty "};

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  int w,h;
  while(cin>>s){
    string ans ="";
    bool f = true;
    for(int i = 0; i < s.size();i+=2){
      w = s[i+1]-'0'-1;
      h = s[i]-'0'-1;
      if( w > 6 || h > 5 || s.size() % 2){
        cout << "NA"<<endl;
        f = false;
        break;
      }
      ans += enc[w][h];
    }
    if(f) cout << ans << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <complex>
using namespace std;

typedef long long ll;
typedef pair<int,int> P;

#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;

inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class T> void preview(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}

const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;

char *dic = "abcdefghijklmnopqrstuvwxyz.?! ";

int main() {
	for(string line; cin >> line;) {
		if(line.length() & 1) {
			cout << "NA" << endl;
			continue;
		}
		bool ok = true;
		int n = line.length();
		for(int i = 0; i < n; i += 2) {
			int c = line[i] - '0';
			if(c > 6 || c == 0) ok = false;
			c = line[i + 1] - '0';
			if(c > 5 || c == 0) ok = false;
		}
		if(!ok) {
			cout << "NA" << endl;
			continue;
		}
		for(int i = 0; i < n; i += 2) {
			cout << dic[5 * (line[i] - '0' - 1) + (line[i + 1] - '0' - 1)];
		}
		cout << endl;
	}
	return 0;
}

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

int main(){
	string ss,ans;
	while(cin>>ss){
		int size=ss.size();
		if(size%2==1){
			cout<<"NA"<<endl;
			continue;
		}
		for(int i=0;i<size;i+=2){
			int num1=ss[i]-'0';
			int num2=ss[i+1]-'0';
			if(num1<1 || num1>6 || num2<1 || num2>5){
				ans="NA";
				break;
			}
			int num=((int)(ss[i]-'0')-1)*5+((int)(ss[i+1]-'0'))-1;
			if(num<26){
				ans+=(char)(num+'a');
			}else if(num==26){
				ans+='.';
			}else if(num==27){
				ans+='?';
			}else if(num==28){
				ans+='!';
			}else if(num==29){
				ans+=" ";
			}else{
				ans="NA";
				break;
			}
		}
		cout<<ans<<endl;
		ans="";
	}
	return 0;
}