Var a, b: array [1..10] of integer;
i, j: integer;
begin
j := 1;
for i := 1 to 10 do
read(a[i]);
for i := 1 to 10 do
if (a[i] mod 2) <> 0 then
begin
b[j] := a[i];
inc(j);
end;
for i := 1 to 10 do
write(a[i], ' ');
writeln;
for i := 1 to j - 1 do
write(b[i], ' ');
end.