var A:array [1..8] of byte; i:integer;   begin for i:=1 to 8 do readln(A[i]); for i:=1 to 8 do writeln(A[i]); for i:=8 downto 1 do begin if not Odd(A[i]) then writeln(A[i]); end; readln; end.