Program gt;
var n,i,j,min,max,l,h:integer;
a:array[1..1000]of integer;
begin
readln(n);
l:=1;h:=1;
max:=-maxint; min:=maxint;
for i:=1 to n do
begin
read(a[i]);
if(a[i]>max)then begin
l:=i; max:=a[i];
end;
if(a[i]h:=i; min:=a[i];
end;
end;
for i:=1 to n do
if(((i>h)and(il)))and(a[i]>10)and(a[i]<50)then<br>write(0,' ') else write(a[i],' ');
end.