while(1 ==1): liczba = int(input()) print(liczba, end=" ") if liczba < 0: break
1 -1 2 2
1 -1
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!