


'''simple docstring'''







import requests

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







def _UpperCamelCase			(	__A       )				->						Any:


      '''simple docstring'''



      UpperCamelCase__      =							"secretKey"
      UpperCamelCase__      =							"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
      UpperCamelCase__      =							request.POST.get("username"       )
      UpperCamelCase__      =							request.POST.get("password"       )
      UpperCamelCase__      =							request.POST.get("g-recaptcha-response"       )

      # post recaptcha response to Google's recaptcha api
      UpperCamelCase__      =							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
            UpperCamelCase__      =							authenticate(__A ,     username=__A ,     password=__A       )
            if user_in_database:
                  login(__A ,     __A       )
                  return redirect("/your-webpage"       )
      return render(__A ,     "login.html"       )









'''simple docstring'''




import os





def 				a_							(    )      ->int:






				'''simple docstring'''

				__lowerCamelCase		:   Dict           =       os.path.dirname(os.path.realpath(lowercase     )     )
				__lowerCamelCase		:   Any           =       os.path.join(lowercase				,    "triangle.txt"     )

				with open(lowercase     ) as in_file:
								__lowerCamelCase		:   List[str]           =       [[int(lowercase     ) for i in line.split()] for line in in_file]

				while len(lowercase     ) != 1:
								__lowerCamelCase		:   List[str]           =       triangle.pop()
								__lowerCamelCase		:   Union[str, Any]           =       triangle[-1]
								for j in range(len(lowercase     ) - 1     ):
												curr_row[j] += max(last_row[j]				,    last_row[j + 1]     )
				return triangle[0][0]


if __name__ == "__main__":
				print(solution())





