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++: 
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>

#include <algorithm>
#include <complex>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#include <bitset>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
#define strtok_r strtok_s
#endif

#define ITER(c)             __typeof__((c).begin())
#define FOREACH(it, c)      for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define RITER(c)            __typeof__((c).rbegin())
#define RFOREACH(it, c)     for (RITER(c) it=(c).rbegin(); it != (c).rend(); ++it)
#define REP(i, n)           REPEAT(i, 0, n)
#define RREP(i, n)          RREPEAT(i, 0, n)
#define REPEAT(i, k, n)     for(int i = (k); i < (k+n); ++i)
#define RREPEAT(i, k, n)    for(int i = (k)+(n)-1; i >= (k); --i)
#define FROMTO(i,f,t)       for(int i = f; i < t; i++)
#define ALL(c)              (c).begin(), (c).end()
#define LLPOW(p1,p2)        ((ll)pow((double)(p1), (int)p2))
#define ESIZEOF(A)          (sizeof(A)/sizeof((A)[0]))
#define CIN_NO_SYNC         do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0)
#define GETSTR(p)           fgets((p), sizeof(p), stdin)
#define CHOMP(p)            do{ char *_q = (p) + strlen(p)-1; if(*_q == '\n' || *_q == '\r') *_q = 0; } while(0)
#define FILL(m,v)           memset(m, v, sizeof(m))
#define mp                  make_pair
#define pb                  push_back
template<class _T> _T MAX(_T p1,_T p2){return (p1>p2)?p1:p2;} 
template<class _T> _T MIN(_T p1,_T p2){return (p1<p2)?p1:p2;} 
template <class _Tv> inline string join(_Tv &v,string sep=" "){
    ostringstream s;FOREACH(it,v){if(it!=v.begin())s<<sep;s<<*it;};return s.str();
}

typedef long long ll;
typedef unsigned long long ull;

#define X real()
#define Y imag()
typedef double D;
typedef complex<D> P;
#define EPS (1e-9)

#ifdef _DEBUG
template<class _Tv> inline void _prfe(const char *_n,_Tv _c,bool _p=false){
    ITER(_c) _it=_c.begin();
    if(_p){cout<<_n<<" = ["<<endl;for(;_it!=_c.end();++_it)cout<<"    "<<*_it<<endl;cout<<"]"<<endl; }
    else{cout<<_n<<" = [ "<<*_it++;for(;_it!=_c.end();++_it)cout<<", "<<*_it;cout<<" ]"<<endl; }
}
#define pf printf
#define pr(n) do{cout<<#n" = "<<(n)<<endl;}while(0)
#define prfe(n) _prfe(#n, n)
#define prfep(n) _prfe(#n, n, true)
#define dbgchk(n) do{if(n)throw;}while(0)
#else
#define pf(...) /* */
#define pr(...) /* */
#define prfe(...) /* */
#define prfep(...) /* */
#define dbgchk(...) /* */
#endif

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

string solve(string s){
    string r;
    int n = s.length();
    if(n%2) return "NA";
    for(int i = 0; i < n; i += 2){
        if(!isdigit(s[i]) || !isdigit(s[i+1])) return "NA";
        int i1 = s[i]-'0'-1, i2 = s[i+1]-'0'-1;
        if(i1 < 0 || i2 < 0 || i1 >= 6 || i2 >= 5) return "NA";
        r += tbl[i1][i2];
    }
    return r;
}

int main(){
    string s;
    while(getline(cin, s)){
        cout << solve(s) << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
  string s;
  while(cin >> s) {
    int const N = s.size();
    string ans;
    bool ok = 1;
    
    if(N % 2) ok = 0;
    
    for(int i=1; i<N; i+=2) {
      int a = s[i-1]-'0', b = s[i]-'0';

      if(a<1 || 6<a || b<1 || 5<b ) ok = 0;
      char ch = (a-1)*5 + (b-1) + 'a';
      if(!isalpha(ch)) {
	if(a == 6 && b == 2) ch = '.';
	else if(a == 6 && b == 3) ch = '?';
	else if(a == 6 && b == 4) ch = '!';
	else if(a == 6 && b == 5) ch = ' ';
	else ok = 0;
      }
      if(ok) ans += ch;
      else break;
    }

    if(ok) {
      cout << ans << endl;
    }
    else {
      cout << "NA" << endl;
    }
  }
  
  return 0;
}

C++: //03
#include<iostream>
#include<sstream>
#include<string>

using namespace std;

int main(){
  for(string s;getline(cin,s);){
    if(s.size()%2){
      goto err;
    }else{
      string o;
      for(int i=0;i*2<s.size();i++){
	const char *t="abcdefghijklmnopqrstuvwxyz.?! ";
	if(s[i*2]<'1'||s[i*2]>'6'||s[i*2+1]<'1'||s[i*2+1]>'5')goto err;
	int idx=(s[i*2]-'1')*5+s[i*2+1]-'1';
	o+=t[idx];
      }
      cout<<o<<endl;
      continue;
    }
  err:
    cout<<"NA"<<endl;
  }
  return 0;
}

C++: #include<bits//stdc++.h>
using namespace std;
int main(){
	string a="abcdefghijklmnopqrstuvwxyz.?! ";
	string b;
	while(cin>>b){
		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]-'1';
			d=(int)b[i+1]-'0';
			int e=c*5+d;
			cout<<a[e-1];
		}
		cout<<endl;
		stop:;
	}
}

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

int main() {
	
	string table = "abcdefghijklmnopqrstuvwxyz.?! ",s,t;
	int i,l;
	
	while(cin>>s){
		l=s.length();
		t="";
		
		if(l%2)
			cout<<"NA";
		else{
			for(i=0;i<l;i+=2){
				if(s[i]<=54 && s[i]>=49 && s[i+1]<=53 && s[i+1]>=49)
					t += table[(s[i]-49)*5+s[i+1]-49];
				else{
					t="NA";break;
				}
			}
			cout<<t;
		}
			
		cout<<endl;
	}
	return 0;
}

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

char table[6][5] = {
	{'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','.','?','!',' '}
};

int main(){
	string s;
	while( cin >> s ){
		string ans;
		if( s.size()%2 ){
			cout << "NA" << endl;
		}else{
			bool flag = false;
			for(int i=1 ; i < s.size() ; i+=2 ){
				int y = s[i-1]-'0'-1;
				int x = s[i]-'0'-1;
				if( y < 0 || x < 0 || y >= 6 || x >= 5 ){
					flag = true;
					break;
				}
				ans += table[y][x];
			}
			if( flag )
				cout << "NA" << endl;
			else
				cout << ans << endl;
		}
	}
}

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

int main(){
    string msg;
    while(cin >> msg){
        if( msg.length()%2 ){
            cout << "NA" << endl;
            continue;
        }
        string res = "";
        bool OK = true;
        for(int i = 0; i < msg.length(); i+=2){
            int x = msg[i]-'0', y = msg[i+1]-'0';
            if( x < 1 || x > 6 || y < 1 || y > 5 ){
                OK = false;
                break;
            }
            char z = (x-1)*5+(y-1)+'a';
            if( 'a' <= z && z <= 'z' ) res.append(1, z);
            else{
                if( z-'a' == 26 ) res.append(1,'.');
                if( z-'a' == 27 ) res.append(1,'?');
                if( z-'a' == 28 ) res.append(1,'!');
                if( z-'a' == 29 ) res.append(1,' ');
            }
        }
        if( OK ){
            cout << res << endl;
        }else{
            cout << "NA" << endl;
        }
    }
    return 0;
}