Python (CPYTHON 2.7.16) Образец

n = int(raw_input())
while n != 42:
	print n
	n = int(raw_input())
Doubtful Deer