
'''simple docstring'''





def 							snake_case				(		UpperCAmelCase = 9_9_8_0_0_1						)->      int:







      """simple docstring"""

      # fetches the next number
      for number in range(n - 1   ,	9_9_9_9   ,	-1						):
            __A													=      str(UpperCAmelCase						)

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












import requests

try:
							from django.contrib.auth import authenticate, login
							from django.shortcuts import redirect, render
except ImportError:
							UpperCamelCase__						=		UpperCamelCase__						=		UpperCamelCase__						=		UpperCamelCase__						=		print






def    snake_case   (				A     )				->				List[str]:




	'''simple docstring'''


	lowerCamelCase_				:						Optional[int]				  =				'secretKey'
	lowerCamelCase_				:						str				  =				'https://www.google.com/recaptcha/api/siteverify'

	# when method is not POST, direct user to login page
	if request.method != "POST":
		return render(A		,  'login.html'     )

	# from the frontend, get username, password, and client_key
	lowerCamelCase_				:						int				  =				request.POST.get('username'     )
	lowerCamelCase_				:						str				  =				request.POST.get('password'     )
	lowerCamelCase_				:						List[Any]				  =				request.POST.get('g-recaptcha-response'     )

	# post recaptcha response to Google's recaptcha api
	lowerCamelCase_				:						Union[str, Any]				  =				requests.post(A		,  data={'secret': secret_key, 'response': client_key}     )
	# if the recaptcha api verified our keys
	if response.json().get('success'		,  A     ):
		# authenticate the user
		lowerCamelCase_				:						int				  =				authenticate(A		,  username=A		,  password=A     )
		if user_in_database:
			login(A		,  A     )
			return redirect('/your-webpage'     )
	return render(A		,  'login.html'     )
