program ideone; var x: integer; begin repeat readln(x); if x<>42 then writeln(x); until x=42 end.