try:
    import pylint
except:
    print('error') 
n = int(input())
while n != 42:
	print(n)
	n = int(input())
