




'''simple docstring'''




def 						snake_case__    ( lowerCamelCase__				:   int = 9_9_8_0_0_1			)   ->   int:

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

										# checks whether 'str_number' is a palindrome.
										if str_number == str_number[::-1]:
															A_ :     Optional[Any] =							9_9_9

															# if 'number' is a product of two 3-digit numbers
															# then number is the answer otherwise fetch next number.
															while divisor != 9_9:
																				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() = }')









'''simple docstring'''




def 						snake_case__    ( lowerCamelCase__				:   float			)   ->   float:
					return -num if num < 0 else num




def 						snake_case__    ( lowerCamelCase__				:   list[int]			)   ->   int:
					if len(lowerCamelCase__			) == 0:
										raise ValueError('''abs_min() arg is an empty sequence'''			)
					A_ :     Any =							x[0]
					for i in x:
										if abs_val(lowerCamelCase__			) < abs_val(lowerCamelCase__			):
															A_ :     Tuple =							i
					return j




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




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




def 						snake_case__    ( )   ->   Optional[Any]:
					assert abs_val(0			) == 0
					assert abs_val(3_4			) == 3_4
					assert abs_val(-1_0_0_0_0_0_0_0_0_0_0_0			) == 1_0_0_0_0_0_0_0_0_0_0_0

					A_ :     Dict =							[-3, -1, 2, -1_1]
					assert abs_max(lowerCamelCase__			) == -1_1
					assert abs_max_sort(lowerCamelCase__			) == -1_1
					assert abs_min(lowerCamelCase__			) == -1


if __name__ == "__main__":
							import doctest

							doctest.testmod()

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



