#include <cstdio>
#include <cstdlib>
#include <cstring>
char buf[256], res[256];
char* s = "z.?! ";
int main()
{
    while (fgets(buf, 256, stdin)) {
        int k = 0;
        bool ok = true;
        for (int i = 0; i < strlen(buf)-1; i+=2) {
            if ('1' <= buf[i] && buf[i] <= '5') {
                if ('1' <= buf[i+1] && buf[i+1] <= '5')
                    res[k++] = 'a' + 5 * (buf[i]-'1') + (buf[i+1]-'1');
                else ok = false;
            }
            else if (buf[i] == '6' && '1' <= buf[i+1] && buf[i+1] <= '5') {
                res[k++] = s[buf[i+1]-'1'];
            }
            else {
                ok = false;
            }
        }
        res[k] = '\0';
        if (ok) puts(res); else puts("NA");
    }
    return 0;
}