def solve(): answer = '' zeros = '0' * 10 print(zeros) x, term = input().split() baseline = int(x) if baseline == 10: return 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() x = int(x) if x == 10: return if x > baseline: answer = answer + str(val) break if x < baseline: answer = answer + '0' break print(answer) solve()