



"""simple docstring"""






import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

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









"""simple docstring"""






def 					snake_case__       (		__lowerCamelCase    :   int     ):
			"""simple docstring"""
			lowerCamelCase__		:		List[Any]		     =[0] * len(__lowerCamelCase     )
			lowerCamelCase__		:		List[Any]		     =[]
			lowerCamelCase__		:		List[Any]		     =[1] * len(__lowerCamelCase     )

			for values in graph.values():
						for i in values:
									indegree[i] += 1

			for i in range(len(__lowerCamelCase     )     ):
						if indegree[i] == 0:
									queue.append(__lowerCamelCase     )

			while queue:
						lowerCamelCase__		:		Tuple		     =queue.pop(0     )
						for x in graph[vertex]:
									indegree[x] -= 1

									if long_dist[vertex] + 1 > long_dist[x]:
												lowerCamelCase__		:		Optional[Any]		     =long_dist[vertex] + 1

									if indegree[x] == 0:
												queue.append(__lowerCamelCase     )

			print(max(__lowerCamelCase     )     )


# Adjacency list of Graph
_lowercase			:			Optional[Any]										=						{0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}

longest_distance(graph)




