for i in range(1000):
	print(str(i).zfill(4))
	if input()=="unlocked":
		break