






def   _A       (    SCREAMING_SNAKE_CASE__  :     int = 998001	):

    # fetches the next number
    for number in range(n - 1					,  9999					,  -1	):
        UpperCamelCase	:Union[str, Any]     							=       str(SCREAMING_SNAKE_CASE__	)

        # checks whether 'str_number' is a palindrome.
        if str_number == str_number[::-1]:
            UpperCamelCase	:Dict     							=       999

            # if 'number' is a product of two 3-digit numbers
            # then number is the answer otherwise fetch next number.
            while divisor != 99:
                if (number % divisor == 0) and (len(str(number // divisor	)	) == 3.0):
                    return number
                divisor -= 1
    raise ValueError('''That number is larger than our acceptable range.'''	)


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













from __future__ import annotations

from enum import Enum







class       UpperCAmelCase_						( lowercase			):



      """simple docstring"""
      UpperCamelCase_    : Optional[Any]									=24
      UpperCamelCase_    : Any									=21
      UpperCamelCase_    : Union[str, Any]									=18
      UpperCamelCase_    : Tuple									=15
      UpperCamelCase_    : List[Any]									=12
      UpperCamelCase_    : Optional[Any]									=9
      UpperCamelCase_    : List[str]									=6
      UpperCamelCase_    : List[str]									=3
      UpperCamelCase_    : Any									=2
      UpperCamelCase_    : List[str]									=1
      UpperCamelCase_    : Optional[Any]									=-1
      UpperCamelCase_    : str									=-2
      UpperCamelCase_    : Any									=-3
      UpperCamelCase_    : Optional[int]									=-6
      UpperCamelCase_    : int									=-9
      UpperCamelCase_    : Optional[int]									=-12
      UpperCamelCase_    : Optional[Any]									=-15
      UpperCamelCase_    : str									=-18
      UpperCamelCase_    : int									=-21
      UpperCamelCase_    : Union[str, Any]									=-24







class       UpperCAmelCase_						( lowercase			):



      """simple docstring"""
      UpperCamelCase_    : Tuple									=8
      UpperCamelCase_    : str									=7
      UpperCamelCase_    : List[str]									=6
      UpperCamelCase_    : List[str]									=5
      UpperCamelCase_    : int									=4
      UpperCamelCase_    : Optional[Any]									=3
      UpperCamelCase_    : Optional[Any]									=2
      UpperCamelCase_    : List[str]									=1







def   _A       (    SCREAMING_SNAKE_CASE__  :     float					,  SCREAMING_SNAKE_CASE__  :     str | SIUnit					,  SCREAMING_SNAKE_CASE__  :     str | SIUnit					,  ):
    if isinstance(SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	):
        UpperCamelCase	:str     							=       SIUnit[known_prefix.lower()]
    if isinstance(SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	):
        UpperCamelCase	:Any     							=       SIUnit[unknown_prefix.lower()]
    UpperCamelCase	:float     							=       known_amount * (
        10 ** (known_prefix.value - unknown_prefix.value)
    )
    return unknown_amount


def   _A       (    SCREAMING_SNAKE_CASE__  :     float					,  SCREAMING_SNAKE_CASE__  :     str | BinaryUnit					,  SCREAMING_SNAKE_CASE__  :     str | BinaryUnit					,  ):
    if isinstance(SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	):
        UpperCamelCase	:Dict     							=       BinaryUnit[known_prefix.lower()]
    if isinstance(SCREAMING_SNAKE_CASE__					,  SCREAMING_SNAKE_CASE__	):
        UpperCamelCase	:List[str]     							=       BinaryUnit[unknown_prefix.lower()]
    UpperCamelCase	:float     							=       known_amount * (
        2 ** ((known_prefix.value - unknown_prefix.value) * 10)
    )
    return unknown_amount


if __name__ == "__main__":
 import doctest

 doctest.testmod()





