






"""simple docstring"""
class      SCREAMING_SNAKE_CASE  :





	"""simple docstring"""




	def __init__(self     ,     lowerCAmelCase_     ,     lowerCAmelCase_=None     ,     lowerCAmelCase_=None							):
		A_		:						Dict	    =   data
		A_		:						Any	    =   previous
		A_		:						List[Any]	    =   next_node





	def __str__(self							):
		return f"""{self.data}"""





	def    lowerCamelCase(self							):
		return self.data





	def    lowerCamelCase(self							):
		return self.next





	def    lowerCamelCase(self							):
		return self.previous






class      SCREAMING_SNAKE_CASE  :





	"""simple docstring"""




	def __init__(self     ,     lowerCAmelCase_							):
		A_		:						int	    =   head





	def __iter__(self							):
		return self





	def    lowerCamelCase(self							):
		if not self.current:
			raise StopIteration
		else:
			A_		:						Optional[Any]	    =   self.current.get_data()
			A_		:						List[str]	    =   self.current.get_next()
			return value






class      SCREAMING_SNAKE_CASE  :





	"""simple docstring"""




	def __init__(self							):
		A_		:						Optional[Any]	    =   None  # First node in list
		A_		:						Dict	    =   None  # Last node in list





	def __str__(self							):
		A_		:						List[Any]	    =   self.head
		A_		:						Any	    =   []
		while current is not None:
			nodes.append(current.get_data()							)
			A_		:						Tuple	    =   current.get_next()
		return " ".join(str(lowerCAmelCase_							) for node in nodes							)





	def __contains__(self     ,     lowerCAmelCase_							):
		A_		:						Dict	    =   self.head
		while current:
			if current.get_data() == value:
				return True
			A_		:						Dict	    =   current.get_next()
		return False





	def __iter__(self							):
		return LinkedListIterator(self.head							)





	def    lowerCamelCase(self							):
		if self.head:
			return self.head.get_data()
		return None





	def    lowerCamelCase(self							):
		if self.tail:
			return self.tail.get_data()
		return None





	def    lowerCamelCase(self     ,     lowerCAmelCase_							):
		if self.head is None:
			A_		:						List[str]	    =   node
			A_		:						Union[str, Any]	    =   node
		else:
			self.insert_before_node(self.head     ,     lowerCAmelCase_							)





	def    lowerCamelCase(self     ,     lowerCAmelCase_							):
		if self.head is None:
			self.set_head(lowerCAmelCase_							)
		else:
			self.insert_after_node(self.tail     ,     lowerCAmelCase_							)





	def    lowerCamelCase(self     ,     lowerCAmelCase_							):
		A_		:						Tuple	    =   Node(lowerCAmelCase_							)
		if self.head is None:
			self.set_head(lowerCAmelCase_							)
		else:
			self.set_tail(lowerCAmelCase_							)





	def    lowerCamelCase(self     ,     lowerCAmelCase_     ,     lowerCAmelCase_							):
		A_		:						Any	    =   node
		A_		:						Optional[int]	    =   node.previous

		if node.get_previous() is None:
			A_		:						Any	    =   node_to_insert
		else:
			A_		:						List[str]	    =   node_to_insert

		A_		:						str	    =   node_to_insert





	def    lowerCamelCase(self     ,     lowerCAmelCase_     ,     lowerCAmelCase_							):
		A_		:						Optional[int]	    =   node
		A_		:						Dict	    =   node.next

		if node.get_next() is None:
			A_		:						Tuple	    =   node_to_insert
		else:
			A_		:						Dict	    =   node_to_insert

		A_		:						str	    =   node_to_insert





	def    lowerCamelCase(self     ,     lowerCAmelCase_     ,     lowerCAmelCase_							):
		A_		:						Tuple	    =   1
		A_		:						Optional[Any]	    =   Node(lowerCAmelCase_							)
		A_		:						Optional[int]	    =   self.head
		while node:
			if current_position == position:
				self.insert_before_node(lowerCAmelCase_     ,     lowerCAmelCase_							)
				return
			current_position += 1
			A_		:						Dict	    =   node.next
		self.insert_after_node(self.tail     ,     lowerCAmelCase_							)





	def    lowerCamelCase(self     ,     lowerCAmelCase_							):
		A_		:						Any	    =   self.head
		while node:
			if node.get_data() == item:
				return node
			A_		:						Optional[int]	    =   node.get_next()
		raise Exception("""Node not found"""							)





	def    lowerCamelCase(self     ,     lowerCAmelCase_							):
		if (node := self.get_node(lowerCAmelCase_							)) is not None:
			if node == self.head:
				A_		:						Any	    =   self.head.get_next()

			if node == self.tail:
				A_		:						str	    =   self.tail.get_previous()

			self.remove_node_pointers(lowerCAmelCase_							)





	@staticmethod
	def    lowerCamelCase(lowerCAmelCase_							):
		if node.get_next():
			A_		:						int	    =   node.previous

		if node.get_previous():
			A_		:						List[Any]	    =   node.next

		A_		:						str	    =   None
		A_		:						List[Any]	    =   None





	def    lowerCamelCase(self							):
		return self.head is None






def 			__UpperCamelCase	(		):
	pass


if __name__ == "__main__":
							import doctest

							doctest.testmod()









"""simple docstring"""
import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
							print("Googling.....")
							_lowerCAmelCase         =							"https://www.google.com/search?q=" + " ".join(sys.argv[1:])
							_lowerCAmelCase         =							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         =							BeautifulSoup(res.text, "html.parser")
							_lowerCAmelCase         =							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")}')

