



'''simple docstring'''



def 							__UpperCAmelCase				(				UpperCamelCase__				:float			)		->						str:
				return -num if num < 0 else num


def 							__UpperCAmelCase				(				UpperCamelCase__				:list[int]			)		->						List[Any]:
				if len(__lowerCamelCase			) == 0:
								raise ValueError('''abs_min() arg is an empty sequence'''			)
				snake_case__      :   List[str]      =    x[0]
				for i in x:
								if abs_val(__lowerCamelCase			) < abs_val(__lowerCamelCase			):
												snake_case__      :   Optional[int]      =    i
				return j


def 							__UpperCAmelCase				(				UpperCamelCase__				:list[int]			)		->						str:
				if len(__lowerCamelCase			) == 0:
								raise ValueError('''abs_max() arg is an empty sequence'''			)
				snake_case__      :   Dict      =    x[0]
				for i in x:
								if abs(__lowerCamelCase			) > abs(__lowerCamelCase			):
												snake_case__      :   Dict      =    i
				return j


def 							__UpperCAmelCase				(				UpperCamelCase__				:list[int]			)		->						Dict:
				if len(__lowerCamelCase			) == 0:
								raise ValueError('''abs_max_sort() arg is an empty sequence'''			)
				return sorted(__lowerCamelCase   ,				key=__lowerCamelCase			)[-1]


def 							__UpperCAmelCase				(				)		->						int:
				assert abs_val(0			) == 0
				assert abs_val(34			) == 34
				assert abs_val(-1000_0000_0000			) == 1000_0000_0000

				snake_case__      :   Union[str, Any]      =    [-3, -1, 2, -11]
				assert abs_max(__lowerCamelCase			) == -11
				assert abs_max_sort(__lowerCamelCase			) == -11
				assert abs_min(__lowerCamelCase			) == -1


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				test_abs_val()
				print(abs_val(-34))  # --> 34









"""simple docstring"""






def 	snake_case__  (						__lowerCamelCase							:       int = 998001      ):
			"""simple docstring"""

			# fetches the next number
			for number in range(n - 1				,						9999				,						-1      ):
						lowerCamelCase__						:						Optional[int]						      =str(__lowerCamelCase      )

						# checks whether 'str_number' is a palindrome.
						if str_number == str_number[::-1]:
									lowerCamelCase__						:						Optional[int]						      =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() = }')




