
class        _SCREAMING_SNAKE_CASE	:



	def __init__(       self					)							->			Optional[Any]:
					lowerCamelCase_         =     0
					lowerCamelCase_         =     0
					lowerCamelCase_         =     {}



	def        SCREAMING_SNAKE_CASE_(       self		,    lowercase					)							->			List[str]:
					if vertex not in self.adjacency:
									lowerCamelCase_         =     {}
									self.num_vertices += 1



	def        SCREAMING_SNAKE_CASE_(       self		,    lowercase		,    lowercase		,    lowercase					)							->			Dict:
					self.add_vertex(lowercase					)
					self.add_vertex(lowercase					)

					if head == tail:
									return

					lowerCamelCase_         =     weight
					lowerCamelCase_         =     weight



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Tuple:
					lowerCamelCase_         =     self.get_edges()
					for edge in edges:
									lowerCamelCase_      ,       lowerCamelCase_      ,       lowerCamelCase_         =     edge
									edges.remove((tail, head, weight)					)
					for i in range(len(lowercase					)					):
									lowerCamelCase_         =     list(edges[i]					)

					edges.sort(key=lambda lowercase					: e[2]					)
					for i in range(len(lowercase					) - 1					):
									if edges[i][2] >= edges[i + 1][2]:
													lowerCamelCase_         =     edges[i][2] + 1
					for edge in edges:
									lowerCamelCase_      ,       lowerCamelCase_      ,       lowerCamelCase_         =     edge
									lowerCamelCase_         =     weight
									lowerCamelCase_         =     weight



	def __str__(       self					)							->			Union[str, Any]:
					lowerCamelCase_         =     ""
					for tail in self.adjacency:
									for head in self.adjacency[tail]:
													lowerCamelCase_         =     self.adjacency[head][tail]
													string += f'{head} -> {tail} == {weight}\n'
					return string.rstrip("\n"					)



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Any:
					lowerCamelCase_         =     []
					for tail in self.adjacency:
									for head in self.adjacency[tail]:
													output.append((tail, head, self.adjacency[head][tail])					)
					return output



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Any:
					return self.adjacency.keys()



	@staticmethod
	def        SCREAMING_SNAKE_CASE_(       lowercase=None		,    lowercase=None					)							->			Optional[int]:
					lowerCamelCase_         =     Graph()
					if vertices is None:
									lowerCamelCase_         =     []
					if edges is None:
									lowerCamelCase_         =     []
					for vertex in vertices:
									g.add_vertex(lowercase					)
					for edge in edges:
									g.add_edge(*lowercase					)
					return g




	class        _SCREAMING_SNAKE_CASE	:



		def __init__(       self					)							->			List[Any]:
						lowerCamelCase_         =     {}
						lowerCamelCase_         =     {}



		def __len__(       self					)							->			int:
						return len(self.parent					)



		def        SCREAMING_SNAKE_CASE_(       self		,    lowercase					)							->			List[Any]:
						if item in self.parent:
										return self.find(lowercase					)

						lowerCamelCase_         =     item
						lowerCamelCase_         =     0
						return item



		def        SCREAMING_SNAKE_CASE_(       self		,    lowercase					)							->			Optional[Any]:
						if item not in self.parent:
										return self.make_set(lowercase					)
						if item != self.parent[item]:
										lowerCamelCase_         =     self.find(self.parent[item]					)
						return self.parent[item]



		def        SCREAMING_SNAKE_CASE_(       self		,    lowercase		,    lowercase					)							->			str:
						lowerCamelCase_         =     self.find(lowercase					)
						lowerCamelCase_         =     self.find(lowercase					)

						if roota == roota:
										return roota

						if self.rank[roota] > self.rank[roota]:
										lowerCamelCase_         =     roota
										return roota

						if self.rank[roota] < self.rank[roota]:
										lowerCamelCase_         =     roota
										return roota

						if self.rank[roota] == self.rank[roota]:
										self.rank[roota] += 1
										lowerCamelCase_         =     roota
										return roota
						return None



	@staticmethod
	def        SCREAMING_SNAKE_CASE_(       lowercase					)							->			List[str]:
					lowerCamelCase_         =     graph.num_vertices

					lowerCamelCase_         =     Graph.UnionFind()
					lowerCamelCase_         =     []
					while num_components > 1:
									lowerCamelCase_         =     {}
									for vertex in graph.get_vertices():
													lowerCamelCase_         =     -1

									lowerCamelCase_         =     graph.get_edges()
									for edge in edges:
													lowerCamelCase_      ,       lowerCamelCase_      ,       lowerCamelCase_         =     edge
													edges.remove((tail, head, weight)					)
									for edge in edges:
													lowerCamelCase_      ,       lowerCamelCase_      ,       lowerCamelCase_         =     edge
													lowerCamelCase_         =     union_find.find(lowercase					)
													lowerCamelCase_         =     union_find.find(lowercase					)
													if seta != seta:
																	if cheap_edge[seta] == -1 or cheap_edge[seta][2] > weight:
																					lowerCamelCase_         =     [head, tail, weight]

																	if cheap_edge[seta] == -1 or cheap_edge[seta][2] > weight:
																					lowerCamelCase_         =     [head, tail, weight]
									for vertex in cheap_edge:
													if cheap_edge[vertex] != -1:
																	lowerCamelCase_      ,       lowerCamelCase_      ,       lowerCamelCase_         =     cheap_edge[vertex]
																	if union_find.find(lowercase					) != union_find.find(lowercase					):
																					union_find.union(lowercase		,    lowercase					)
																					mst_edges.append(cheap_edge[vertex]					)
																					lowerCamelCase_         =     num_components - 1
					lowerCamelCase_         =     Graph.build(edges=lowercase					)
					return mst




import math





def      lowerCamelCase_					(							lowerCamelCase__       ):

				if 1 < number < 4:
								# 2 and 3 are primes
								return True
				elif number < 2 or number % 2 == 0 or number % 3 == 0:
								# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
								return False

				# All primes number are in format of 6k +/- 1
				for i in range(5      ,					int(math.sqrt(lowerCamelCase__       ) + 1       )      ,					6       ):
								if number % i == 0 or number % (i + 2) == 0:
												return False
				return True





def      lowerCamelCase_					(							lowerCamelCase__ = 1_0_0_0_1       ):

				try:
								lowerCamelCase_         =     int(lowerCamelCase__       )
				except (TypeError, ValueError):
								raise TypeError("Parameter nth must be int or castable to int."       ) from None
				if nth <= 0:
								raise ValueError("Parameter nth must be greater than or equal to one."       )
				lowerCamelCase_         =     []
				lowerCamelCase_         =     2
				while len(lowerCamelCase__       ) < nth:
								if is_prime(lowerCamelCase__       ):
												primes.append(lowerCamelCase__       )
												num += 1
								else:
												num += 1
				return primes[len(lowerCamelCase__       ) - 1]


if __name__ == "__main__":
			print(F"""{solution() = }""")


