uses crt;
var a:array[1..100]of integer;
i,n,d,j,kt:integer;
st:string;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
begin
str(a[i],st);
d:=length(st);
kt:=0;
for j:=1 to d do
if st[j]<>st[d-j+1] then kt:=1;
if kt=0 then write(st:4);
end;
readln;
end.