import threading, time, sys
killed = False
def x(n):
global killed
while not killed:
print(n)
time.sleep(0.2)
threading.Thread(target=x, args=[1]).start()
time.sleep(0.1)
threading.Thread(target=x, args=[2]).start()
sys.stdin.readline()
killed = True