answer = '' zeros = '0' * 10 print(zeros) x, term = input().split() baseline = int(x) for pos in range(10): for val in range(1, 10): guess = '0' * pos + str(val) + '0' * (9 - pos) print(guess) x, term = input().split() if int(x) > baseline: answer = answer + str(val) continue if int(x) < baseline: answer = answer + '0' continue print(answer)