uses crt;
var a:array[1..20] of longint;
i,n:longint;
function kt(k:longint):longint;
var d,l:longint;
begin
d:=0;
while k<>0 do
begin
l:=k mod 10;
k:=k div 10;
d:=d*10+l;
end;
kt:=d;
end;
begin
clrscr;
write('Nhap n: '); readln(n);
if (n>=5) and (n<=20) then begin
for i:=1 to n do
begin
write('a[',i,'] = '); readln(a[i]);
end;
write('Cac so palindrom trong day la: ');
for i:=1 to n do
if kt(a[i])=a[i] then write(a[i],' '); end else write('Ko thoa man dieu kien cua n');
readln
end.