




'''simple docstring'''







from __future__ import annotations

from queue import Queue





class 					lowerCamelCase_							:




					'''simple docstring'''






					def __init__(   self			):
							_snake_case     	=	{}






					def     __SCREAMING_SNAKE_CASE     (   self			):
							for i in self.vertices:
									print(__UpperCamelCase,  " : ",  " -> ".join([str(__UpperCamelCase			) for j in self.vertices[i]]			)			)






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase,  __UpperCamelCase			):
							if from_vertex in self.vertices:
									self.vertices[from_vertex].append(__UpperCamelCase			)
							else:
									_snake_case     	=	[to_vertex]






					def     __SCREAMING_SNAKE_CASE     (   self,  __UpperCamelCase			):
							_snake_case     	=	set()

							# create a first in first out queue to store all the vertices for BFS
							_snake_case     	=	Queue()

							# mark the source node as visited and enqueue it
							visited.add(__UpperCamelCase			)
							queue.put(__UpperCamelCase			)

							while not queue.empty():
									_snake_case     	=	queue.get()

									# loop through all adjacent vertex and enqueue it if not yet visited
									for adjacent_vertex in self.vertices[vertex]:
											if adjacent_vertex not in visited:
													queue.put(__UpperCamelCase			)
													visited.add(__UpperCamelCase			)
							return visited


if __name__ == "__main__":
						from doctest import testmod

						testmod(verbose=True)

						_lowerCamelCase							:						Any							     =  Graph()
						g.add_edge(0, 1)
						g.add_edge(0, 2)
						g.add_edge(1, 2)
						g.add_edge(2, 0)
						g.add_edge(2, 3)
						g.add_edge(3, 3)

						g.print_graph()
						# 0  :  1 -> 2
						# 1  :  2
						# 2  :  0 -> 3
						# 3  :  3

						assert sorted(g.bfs(2)) == [0, 1, 2, 3]











'''simple docstring'''







def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 9 / 5) + 32						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round(float(lowercase_  ) + 273.15						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 9 / 5) + 491.67						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) - 32) * 5 / 9						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round(((float(lowercase_  ) - 32) * 5 / 9) + 273.15						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round(float(lowercase_  ) + 459.67						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round(float(lowercase_  ) - 273.15						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round(((float(lowercase_  ) - 273.15) * 9 / 5) + 32						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 9 / 5)						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) - 491.67) * 5 / 9						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round(float(lowercase_  ) - 459.67						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 5 / 9)						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 1.25 + 273.15)						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 2.25 + 32)						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 1.25)						,							lowercase_  )






def 		_lowercase		(     lowercase_						,							lowercase_ = 2  ):



		'''simple docstring'''







		return round((float(lowercase_  ) * 2.25 + 32 + 459.67)						,							lowercase_  )


if __name__ == "__main__":
						import doctest

						doctest.testmod()





