while True: x=int(raw_input()) if x!=42: print x else: break
25 5 56 42 56
25 5 56
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!