这道题要格外的文件读入(当然这比较少见,我当时应该也是从题解上抄的txt文件读入吧。。。)其他就没什么好说的了

program namenum;
const
a:array[1..26] of integer=(2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,0,7,7,8,8,8,9,9,9,0);
var
s,n,s1,x:string;
fp:text;
i,k:integer;
flag:boolean;
begin
assign(input,'namenum.in');
reset(input);
assign(output,'namenum.out');
rewrite(output);
readln(n);
close(input);
assign(fp,'dict.txt');//读入字典(文件)
reset(fp);
flag:=false;
while not eof(fp) do
begin
inc(k);
readln(fp,s);
if length(s)=length(n) then
begin
s1:='';
for i:=1 to length(s) do
begin
str(a[ord(s[i])-ord('A')+1],x);
s1:=s1+x;
end;
if s1=n then
begin
flag:=true;
writeln(s);
end;
end;
end;
if not flag then writeln('NONE');
close(fp);
close(output);
end.