




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

lowerCamelCase__ :   str					=							TypeVar('KEY')
lowerCamelCase__ :   Tuple					=							TypeVar('VAL')





@dataclass(frozen=_SCREAMING_SNAKE_CASE       ,   slots=_SCREAMING_SNAKE_CASE					)
class        lowerCamelCase_							(      Generic[KEY, VAL]					):


 '''simple docstring'''







 lowercase_				    =    42
 lowercase_				    =    42





class        lowerCamelCase_							(      _Item					):


 '''simple docstring'''







 def __init__(							self  :		Optional[int]						):
       super().__init__(_lowerCAmelCase				,				_lowerCAmelCase						)




 def __bool__(							self  :		List[Any]						):
       return False


lowerCamelCase__ :   List[Any]					=							_DeletedItem()





class        lowerCamelCase_							(      MutableMapping[KEY, VAL]					):


 '''simple docstring'''







 def __init__(							self  :		Optional[int]				,				_lowerCAmelCase  :		int = 8				,				_lowerCAmelCase  :		float = 0.75						):
       SCREAMING_SNAKE_CASE_							=			initial_block_size
       SCREAMING_SNAKE_CASE_							=			[None] * initial_block_size
       assert 0.0 < capacity_factor < 1.0
       SCREAMING_SNAKE_CASE_							=			capacity_factor
       SCREAMING_SNAKE_CASE_							=			0



 def       lowerCAmelCase_  (							self  :		Union[str, Any]				,				_lowerCAmelCase  :		KEY						):
       return hash(_lowerCAmelCase						) % len(self._buckets						)



 def       lowerCAmelCase_  (							self  :		List[Any]				,				_lowerCAmelCase  :		int						):
       return (ind + 1) % len(self._buckets						)



 def       lowerCAmelCase_  (							self  :		Dict				,				_lowerCAmelCase  :		int				,				_lowerCAmelCase  :		KEY				,				_lowerCAmelCase  :		VAL						):
       SCREAMING_SNAKE_CASE_							=			self._buckets[ind]
       if not stored:
             SCREAMING_SNAKE_CASE_							=			_Item(_lowerCAmelCase				,				_lowerCAmelCase						)
             self._len += 1
             return True
       elif stored.key == key:
             SCREAMING_SNAKE_CASE_							=			_Item(_lowerCAmelCase				,				_lowerCAmelCase						)
             return True
       else:
             return False



 def       lowerCAmelCase_  (							self  :		str						):
       SCREAMING_SNAKE_CASE_							=			len(self._buckets						) * self._capacity_factor
       return len(self						) >= int(_lowerCAmelCase						)



 def       lowerCAmelCase_  (							self  :		Tuple						):
       if len(self._buckets						) <= self._initial_block_size:
             return False
       SCREAMING_SNAKE_CASE_							=			len(self._buckets						) * self._capacity_factor / 2
       return len(self						) < limit



 def       lowerCAmelCase_  (							self  :		int				,				_lowerCAmelCase  :		int						):
       SCREAMING_SNAKE_CASE_							=			self._buckets
       SCREAMING_SNAKE_CASE_							=			[None] * new_size
       SCREAMING_SNAKE_CASE_							=			0
       for item in old_buckets:
             if item:
                   self._add_item(item.key				,				item.val						)



 def       lowerCAmelCase_  (							self  :		int						):
       self._resize(len(self._buckets						) * 2						)



 def       lowerCAmelCase_  (							self  :		Optional[Any]						):
       self._resize(len(self._buckets						) // 2						)



 def       lowerCAmelCase_  (							self  :		Union[str, Any]				,				_lowerCAmelCase  :		KEY						):
       SCREAMING_SNAKE_CASE_							=			self._get_bucket_index(_lowerCAmelCase						)
       for _ in range(len(self._buckets						)						):
             yield ind
             SCREAMING_SNAKE_CASE_							=			self._get_next_ind(_lowerCAmelCase						)



 def       lowerCAmelCase_  (							self  :		Any				,				_lowerCAmelCase  :		KEY				,				_lowerCAmelCase  :		VAL						):
       for ind in self._iterate_buckets(_lowerCAmelCase						):
             if self._try_set(_lowerCAmelCase				,				_lowerCAmelCase				,				_lowerCAmelCase						):
                   break



 def __setitem__(							self  :		Optional[int]				,				_lowerCAmelCase  :		KEY				,				_lowerCAmelCase  :		VAL						):
       if self._is_full():
             self._size_up()

       self._add_item(_lowerCAmelCase				,				_lowerCAmelCase						)



 def __delitem__(							self  :		Any				,				_lowerCAmelCase  :		KEY						):
       for ind in self._iterate_buckets(_lowerCAmelCase						):
             SCREAMING_SNAKE_CASE_							=			self._buckets[ind]
             if item is None:
                   raise KeyError(_lowerCAmelCase						)
             if item is _deleted:
                   continue
             if item.key == key:
                   SCREAMING_SNAKE_CASE_							=			_deleted
                   self._len -= 1
                   break
       if self._is_sparse():
             self._size_down()



 def __getitem__(							self  :		Optional[Any]				,				_lowerCAmelCase  :		KEY						):
       for ind in self._iterate_buckets(_lowerCAmelCase						):
             SCREAMING_SNAKE_CASE_							=			self._buckets[ind]
             if item is None:
                   break
             if item is _deleted:
                   continue
             if item.key == key:
                   return item.val
       raise KeyError(_lowerCAmelCase						)



 def __len__(							self  :		List[str]						):
       return self._len



 def __iter__(							self  :		Optional[Any]						):
       yield from (item.key for item in self._buckets if item)




 def __repr__(							self  :		Optional[Any]						):
       SCREAMING_SNAKE_CASE_							=			' ,'.join(
           F"{item.key}: {item.val}" for item in self._buckets if item						)
       return F"HashMap({val_string})"





import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
   print('Googling.....')
   lowerCamelCase__ :   List[Any]					=							'https://www.google.com/search?q=' + ' '.join(sys.argv[1:])
   lowerCamelCase__ :   List[Any]					=							requests.get(url, headers={'UserAgent': UserAgent().random})
   # res.raise_for_status()
   with open('project1a.html', 'wb') as out_file:  # only for knowing the class
      for data in res.iter_content(10_000):
         out_file.write(data)
   lowerCamelCase__ :   int					=							BeautifulSoup(res.text, 'html.parser')
   lowerCamelCase__ :   List[str]					=							list(soup.select('.eZt8xd'))[:5]

   print(len(links))
   for link in links:
      if link.text == "Maps":
         webbrowser.open(link.get('href'))
      else:
         webbrowser.open(f'''https://google.com{link.get('href')}''')