

'''simple docstring'''
def       _A	(			snake_case  )    ->			int:
   _lowercase    :   Union[str, Any]      =     len(snake_case  )
   _lowercase    :   Optional[int]      =     [0] * length
   _lowercase    :   int      =     [[False for i in range(snake_case  )] for j in range(snake_case  )]
   for i, c in enumerate(snake_case  ):
      _lowercase    :   Optional[int]      =     i
      for j in range(i + 1  ):
         if c == string[j] and (i - j < 2 or is_palindromic[j + 1][i - 1]):
            _lowercase    :   List[str]      =     True
            _lowercase    :   Tuple      =     min(snake_case	,							0 if j == 0 else (cut[j - 1] + 1)  )
      _lowercase    :   Dict      =     mincut
   return cut[length - 1]


if __name__ == "__main__":
    _snake_case     						=						input('Enter the string: ').strip()
    _snake_case     						=						find_minimum_partitions(s)
    print(F'''Minimum number of partitions required for the \'{s}\' is {ans}''')









'''simple docstring'''
import requests

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







def       _A	(			snake_case  )    ->			Any:
   # Enter your recaptcha secret key here
   _lowercase    :   Optional[Any]      =     "secretKey"
   _lowercase    :   Union[str, Any]      =     "https://www.google.com/recaptcha/api/siteverify"

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

   # from the frontend, get username, password, and client_key
   _lowercase    :   Optional[int]      =     request.POST.get("username"  )
   _lowercase    :   Tuple      =     request.POST.get("password"  )
   _lowercase    :   Tuple      =     request.POST.get("g-recaptcha-response"  )

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






