k=0
t=True
while t:
    print(str(k).zfill(3),flush=True)
    if input()=="unlocked":
        t=False        
    k+=1