
"""simple docstring"""







def    __lowerCAmelCase    (_UpperCamelCase		):
	__lowerCAmelCase      :						Optional[int]						      =				0

	# if input_string is "aba" than new_input_string become "a|b|a"
	__lowerCAmelCase      :						Union[str, Any]						      =				''
	__lowerCAmelCase      :						Tuple						      =				''

	# append each character + "|" in new_string for range(0, length-1)
	for i in input_string[: len(_UpperCamelCase		) - 1]:
		new_input_string += i + "|"
	# append last character
	new_input_string += input_string[-1]

	# we will store the starting and ending of previous furthest ending palindromic
	# substring
	__lowerCAmelCase      ,       __lowerCAmelCase      :						List[str]						      =				0, 0

	# length[i] shows the length of palindromic substring with center i
	__lowerCAmelCase      :						List[Any]						      =				[1 for i in range(len(_UpperCamelCase		)		)]

	# for each character in new_string find corresponding palindromic string
	__lowerCAmelCase      :						Optional[int]						      =				0
	for j in range(len(_UpperCamelCase		)		):
		__lowerCAmelCase      :						int						      =				1 if j > r else min(length[l + r - j] // 2	,  r - j + 1		)
		while (
		    j - k >= 0
		    and j + k < len(_UpperCamelCase		)
		    and new_input_string[k + j] == new_input_string[j - k]
		):
			k += 1

		__lowerCAmelCase      :						List[str]						      =				2 * k - 1

		# does this string is ending after the previously explored end (that is r) ?
		# if yes the update the new r to the last index of this
		if j + k - 1 > r:
			__lowerCAmelCase      :						str						      =				j - k + 1  # noqa: E741
			__lowerCAmelCase      :						Optional[int]						      =				j + k - 1

		# update max_length and start position
		if max_length < length[j]:
			__lowerCAmelCase      :						Optional[Any]						      =				length[j]
			__lowerCAmelCase      :						List[Any]						      =				j

    # create that string
	__lowerCAmelCase      :						Optional[Any]						      =				new_input_string[start - max_length // 2 : start + max_length // 2 + 1]
	for i in s:
		if i != "|":
			output_string += i

	return output_string


if __name__ == "__main__":
							import doctest

							doctest.testmod()

"""simple docstring"""







from __future__ import annotations
def    __lowerCAmelCase    (_UpperCamelCase		):
	__lowerCAmelCase      :						List[str]						      =				str(_UpperCamelCase		)
	return len(_UpperCamelCase		) == 9 and set(_UpperCamelCase		) == set('123456789'		)
def    __lowerCAmelCase    ():
	for base_num in range(9999	,  4999	,  -1		):
		__lowerCAmelCase      :						Union[str, Any]						      =				10_0002 * base_num
		if is_9_pandigital(_UpperCamelCase		):
			return candidate

	for base_num in range(333	,  99	,  -1		):
		__lowerCAmelCase      :						Dict						      =				100_2003 * base_num
		if is_9_pandigital(_UpperCamelCase		):
			return candidate

	return None


if __name__ == "__main__":
							print(f'{solution() = }')