var
a: array[1..50] of integer;
i,f, n: integer;
begin
write('n=');
readln(n);
for i := 1 to n do
begin
write('a', i, '=');
readln(a[i]);
end;
f := 0;
writeln;
for i := 1 to n - 1 do
if (a[i] mod 2 <> 0) and (a[i + 1] mod 2 = 0) then f := 1;
if f = 0 then
begin
for i := 1 to n do
if a[i] < 0 then write(a[i]:4);
end
else
for i := 1 to n do
if a[i] > 0 then write(a[i]:4);
end.