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++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  string t[] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
  string s;
  while (cin >> s) {
    if (odd(s.size())) {
      cout << "NA" << endl;
      continue;
    }
    stringstream ss;
    for (int i = 0; i < s.size(); i += 2) {
      if (s[i] < '1' || '6' < s[i] || s[i + 1] < '1' || '5' < s[i + 1]) {
        cout << "NA" << endl;
        goto next;
      }
      ss << t[s[i] - '1'][s[i + 1] - '1'];
    }
    cout << ss.str() << endl;
  next:;
  }
}

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

string s, r;

inline int cast(char c) {
	return (int)(c - '0');
}

int main(){
	bool fg;
	int a, b;
	while (cin >> s) {
		fg = false;
		r = "";
		if (s.size() % 2 != 0) {
			cout << "NA" << endl;
			continue;
		}
		for (int i = 0; i < s.size(); i += 2) {
			a = cast(s[i]), b = cast(s[i + 1]);
			if (a > 6 || b > 5 || a < 1 || b < 1) {
				fg = true;
				break;
			}
			if (a < 6) {
				r += ('a' + ((a - 1) * 5 + (b - 1)));
			}
			else {
				switch (b) {
				case 1:r += 'z';
					break;
				case 2:r += '.';
					break;
				case 3:r += '?';
					break;
				case 4:r += '!';
					break;
				case 5:r += ' ';
					break;
				default:break;
				}
			}
		}
		if (fg) {
			cout << "NA" << endl;
		}
		else {
			cout << r << endl;
		}
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<stdlib.h>
using namespace std;
int main()
{
	string po[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', ' ' } };
	string s;

	while (cin >> s){
		if (s.size() % 2 == 1){
			cout << "NA" << endl;
		}
		else{
			for (int i = 0; i < s.size(); i += 2){
				string x, y;
				x = s[i + 1];
				y = s[i];
				cout << po[stoi(x)][stoi(y)];
			}cout << endl;
		}
	}
}

C++: #include <iostream>
#include <string>
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', '.', '?', '!', ' '}
};

string translate(string s) {
    if (s.length() % 2 == 1) {
        return "NA";
    }
    for (int i = 0; i < s.length(); i++) {
        if (i % 2 == 1 && !('1' <= s[i] && s[i] <= '5')) {
            return "NA";
        }
        if (!('1' <= s[i] && s[i] <= '6')) {
            return "NA";
        }
    }
    string ts;
    for (int i = 0; i < s.length(); i+=2) {
        int a = s[i]   - '0' - 1;
        int b = s[i+1] - '0' - 1;
        ts.push_back(table[a][b]);
    }
    return ts;
}

int main() {
    string s;
    while (cin >> s) {
        cout << translate(s) << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
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;
		}
	}
}