

from collections.abc import Iterator, MutableMapping
from dataclasses import dataclass
from typing import Generic, TypeVar

a_      =     TypeVar('KEY')
a_      =     TypeVar('VAL')






@dataclass(frozen=__A				,						slots=__A )
class _UpperCamelCase				(				Generic[KEY, VAL] ):
			'''simple docstring'''







			lowerCamelCase__							     =42
			lowerCamelCase__							     =42






class _UpperCamelCase				(				_Item ):
			'''simple docstring'''







			def __init__(      self				:			Dict						)				->							None:

				"""simple docstring"""

				super().__init__(a   ,   a						)






			def __bool__(      self				:			str						)				->							bool:

				"""simple docstring"""

				return False

a_      =     _DeletedItem()






class _UpperCamelCase				(				MutableMapping[KEY, VAL] ):
			'''simple docstring'''







			def __init__(      self				:			Union[str, Any]   ,   a				:			int = 8   ,   a				:			float = 0.75						)				->							None:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE :   int					  =							initial_block_size
				SCREAMING_SNAKE_CASE :   list[_Item | None]					  =							[None] * initial_block_size
				assert 0.0 < capacity_factor < 1.0
				SCREAMING_SNAKE_CASE :   List[str]					  =							capacity_factor
				SCREAMING_SNAKE_CASE :   List[Any]					  =							0
			def 				__UpperCamelCase			(      self				:			str   ,   a				:			KEY						)				->							int:

				"""simple docstring"""

				return hash(a						) % len(self._buckets						)
			def 				__UpperCamelCase			(      self				:			Optional[Any]   ,   a				:			int						)				->							int:

				"""simple docstring"""

				return (ind + 1) % len(self._buckets						)
			def 				__UpperCamelCase			(      self				:			List[Any]   ,   a				:			int   ,   a				:			KEY   ,   a				:			VAL						)				->							bool:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE :   Tuple					  =							self._buckets[ind]
				if not stored:
					SCREAMING_SNAKE_CASE :   int					  =							_Item(a   ,   a						)
					self._len += 1
					return True
				elif stored.key == key:
					SCREAMING_SNAKE_CASE :   Dict					  =							_Item(a   ,   a						)
					return True
				else:
					return False
			def 				__UpperCamelCase			(      self				:			Union[str, Any]						)				->							bool:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE :   int					  =							len(self._buckets						) * self._capacity_factor
				return len(self						) >= int(a						)
			def 				__UpperCamelCase			(      self				:			Tuple						)				->							bool:

				"""simple docstring"""

				if len(self._buckets						) <= self._initial_block_size:
					return False
				SCREAMING_SNAKE_CASE :   Optional[int]					  =							len(self._buckets						) * self._capacity_factor / 2
				return len(self						) < limit
			def 				__UpperCamelCase			(      self				:			Any   ,   a				:			int						)				->							None:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE :   Tuple					  =							self._buckets
				SCREAMING_SNAKE_CASE :   Optional[int]					  =							[None] * new_size
				SCREAMING_SNAKE_CASE :   Dict					  =							0
				for item in old_buckets:
					if item:
						self._add_item(item.key   ,   item.val						)
			def 				__UpperCamelCase			(      self				:			Tuple						)				->							None:

				"""simple docstring"""

				self._resize(len(self._buckets						) * 2						)
			def 				__UpperCamelCase			(      self				:			List[str]						)				->							None:

				"""simple docstring"""

				self._resize(len(self._buckets						) // 2						)
			def 				__UpperCamelCase			(      self				:			List[str]   ,   a				:			KEY						)				->							Iterator[int]:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE :   Dict					  =							self._get_bucket_index(a						)
				for _ in range(len(self._buckets						)						):
					yield ind
					SCREAMING_SNAKE_CASE :   int					  =							self._get_next_ind(a						)
			def 				__UpperCamelCase			(      self				:			List[Any]   ,   a				:			KEY   ,   a				:			VAL						)				->							None:

				"""simple docstring"""

				for ind in self._iterate_buckets(a						):
					if self._try_set(a   ,   a   ,   a						):
						break
			def __setitem__(      self				:			List[str]   ,   a				:			KEY   ,   a				:			VAL						)				->							None:

				"""simple docstring"""

				if self._is_full():
					self._size_up()

				self._add_item(a   ,   a						)
			def __delitem__(      self				:			int   ,   a				:			KEY						)				->							None:

				"""simple docstring"""

				for ind in self._iterate_buckets(a						):
					SCREAMING_SNAKE_CASE :   List[str]					  =							self._buckets[ind]
					if item is None:
						raise KeyError(a						)
					if item is _deleted:
						continue
					if item.key == key:
						SCREAMING_SNAKE_CASE :   int					  =							_deleted
						self._len -= 1
						break
				if self._is_sparse():
					self._size_down()
			def __getitem__(      self				:			List[str]   ,   a				:			KEY						)				->							VAL:

				"""simple docstring"""

				for ind in self._iterate_buckets(a						):
					SCREAMING_SNAKE_CASE :   List[Any]					  =							self._buckets[ind]
					if item is None:
						break
					if item is _deleted:
						continue
					if item.key == key:
						return item.val
				raise KeyError(a						)
			def __len__(      self				:			Optional[Any]						)				->							int:

				"""simple docstring"""

				return self._len
			def __iter__(      self				:			Any						)				->							Iterator[KEY]:

				"""simple docstring"""

				yield from (item.key for item in self._buckets if item)






			def __repr__(      self				:			Optional[int]						)				->							str:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE :   int					  =							" ,".join(
				    F"{item.key}: {item.val}" for item in self._buckets if item						)
				return F"HashMap({val_string})"





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)

