Var inner,i, a,b,c,d,N,N1 : integer;
ar:array[1..N] of integer;
bar:array[1..N1];
begin
read(N);
inner:=0;
for i:=1 to N do
read(ar[i]);
for i:=1 to N do begin
a:=arr[i] mod 10;
b:=arr[i] div 10;
c:=b mod 10;
d:=b div 10;
if ((a=1) or (a=2)) and((c=1) or (c=2)) and ((d=1) or (d=2)) do begin
inner:=inner+1;
bar[inner]:=ar[i];
end;
end;
if inner=0 then write ('Элемнтов нет!')
end.