DIGIT = 100 ans = "" is_zero = False for i in range(DIGIT - 1, -1, -1): if is_zero: ans = 10 * ans continue for j in range(9, -1, -1): m = str(j + 1) + "0" * i print("?", 1, m) match input(): case "<": continue case "=": is_zero = True ans += j + 1 break case ">": ans += j + 1 break print("!", ans if ans else 0)