"""simple docstring"""



import webbrowser
from sys import argv
from urllib.parse import parse_qs, quote

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
   SCREAMING_SNAKE_CASE__:int									=			"""%20""".join(argv[1:]) if len(argv) > 1 else quote(str(input("""Search: """)))

   print("""Googling.....""")

   SCREAMING_SNAKE_CASE__:Tuple									=			F'''https://www.google.com/search?q={query}&num=100'''

   SCREAMING_SNAKE_CASE__:List[Any]									=			requests.get(
       url,
       headers={"""User-Agent""": str(UserAgent().random)},
   )

   try:
      SCREAMING_SNAKE_CASE__:Union[str, Any]									=			(
          BeautifulSoup(res.text, """html.parser""")
          .find("""div""", attrs={"""class""": """yuRUbf"""})
          .find("""a""")
          .get("""href""")
      )

   except AttributeError:
      SCREAMING_SNAKE_CASE__:int									=			parse_qs(
          BeautifulSoup(res.text, """html.parser""")
          .find("""div""", attrs={"""class""": """kCrYT"""})
          .find("""a""")
          .get("""href""")
      )["""url"""][0]

   webbrowser.open(link)

"""simple docstring"""



import os



def 	_lowerCamelCase(	a = "matrix.txt"				):
       with open(os.path.join(os.path.dirname(a				)   ,    a				)				) as in_file:
              __a       =    in_file.read()

       __a       =    [[int(a				) for cell in row.split(","				)] for row in data.strip().splitlines()]
       __a       =    [[0 for cell in row] for row in grid]
       __a       =    len(grid[0]				)

       __a       =    [[0 for i in range(a				)] for j in range(a				)]
       __a       =    grid[0][0]
       for i in range(1   ,    a				):
              __a       =    grid[0][i] + dp[0][i - 1]
       for i in range(1   ,    a				):
              __a       =    grid[i][0] + dp[i - 1][0]

       for i in range(1   ,    a				):
              for j in range(1   ,    a				):
                     __a       =    grid[i][j] + min(dp[i - 1][j]   ,    dp[i][j - 1]				)

       return dp[-1][-1]


if __name__ == "__main__":
   print(F'''{solution() = }''')
