# coding=utf-8

import threading



def fun(i,event):

print(i)

event.wait()

print(i+100)



e=threading.Event()

for i in range(10):

t=threading.Thread(target=fun,args=(i,e))

t.start()

e.clear()



data=input(">>>>")

if data=="1":

e.set()