




import numpy as np

__magic_name__  :  List[str]					=       [
    ["""a""", """b""", """c""", """d""", """e"""],
    ["""f""", """g""", """h""", """i""", """k"""],
    ["""l""", """m""", """n""", """o""", """p"""],
    ["""q""", """r""", """s""", """t""", """u"""],
    ["""v""", """w""", """x""", """y""", """z"""],
]





class     SCREAMING_SNAKE_CASE__		:
     def __init__(						self	:		Tuple						):



       """simple docstring"""
       lowerCAmelCase__										=      np.array(__lowerCamelCase						)
     def        A__      (						self	:		str       ,						__lowerCamelCase	:		str						):



       """simple docstring"""
       lowerCAmelCase__				,      lowerCAmelCase__										=      np.where(letter == self.SQUARE						)
       lowerCAmelCase__										=      np.concatenate([indexa + 1, indexa + 1]						)
       return indexes
     def        A__      (						self	:		int       ,						__lowerCamelCase	:		int       ,						__lowerCamelCase	:		int						):



       """simple docstring"""
       lowerCAmelCase__										=      self.SQUARE[indexa - 1, indexa - 1]
       return letter
     def        A__      (						self	:		Optional[int]       ,						__lowerCamelCase	:		str						):



       """simple docstring"""
       lowerCAmelCase__										=      message.lower()
       lowerCAmelCase__										=      message.replace(''' '''       ,						''''''						)
       lowerCAmelCase__										=      message.replace('''j'''       ,						'''i'''						)

       lowerCAmelCase__										=      np.empty((2, len(__lowerCamelCase						))						)
       for letter_index in range(len(__lowerCamelCase						)						):
         lowerCAmelCase__										=      self.letter_to_numbers(message[letter_index]						)

         lowerCAmelCase__										=      numbers[0]
         lowerCAmelCase__										=      numbers[1]

       lowerCAmelCase__										=      first_step.reshape(2 * len(__lowerCamelCase						)						)
       lowerCAmelCase__										=      ''''''
       for numbers_index in range(len(__lowerCamelCase						)						):
         lowerCAmelCase__										=      int(second_step[numbers_index * 2]						)
         lowerCAmelCase__										=      int(second_step[(numbers_index * 2) + 1]						)
         lowerCAmelCase__										=      self.numbers_to_letter(__lowerCamelCase       ,						__lowerCamelCase						)
         lowerCAmelCase__										=      encoded_message + letter

       return encoded_message



     def        A__      (						self	:		List[Any]       ,						__lowerCamelCase	:		str						):



       """simple docstring"""
       lowerCAmelCase__										=      message.lower()
       message.replace(''' '''       ,						''''''						)
       lowerCAmelCase__										=      np.empty(2 * len(__lowerCamelCase						)						)
       for letter_index in range(len(__lowerCamelCase						)						):
         lowerCAmelCase__										=      self.letter_to_numbers(message[letter_index]						)
         lowerCAmelCase__										=      numbers[0]
         lowerCAmelCase__										=      numbers[1]

       lowerCAmelCase__										=      first_step.reshape((2, len(__lowerCamelCase						))						)
       lowerCAmelCase__										=      ''''''
       for numbers_index in range(len(__lowerCamelCase						)						):
         lowerCAmelCase__										=      int(second_step[0, numbers_index]						)
         lowerCAmelCase__										=      int(second_step[1, numbers_index]						)
         lowerCAmelCase__										=      self.numbers_to_letter(__lowerCamelCase       ,						__lowerCamelCase						)
         lowerCAmelCase__										=      decoded_message + letter

       return decoded_message







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__":
      __magic_name__  :  List[Any]					=       """%20""".join(argv[1:]) if len(argv) > 1 else quote(str(input("""Search: """)))

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

      __magic_name__  :  List[Any]					=       F"https://www.google.com/search?q={query}&num=100"

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

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

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

      webbrowser.open(link)

