
class 			UpperCamelCase__		:







	'''simple docstring'''





	def __init__(      self					,							UpperCamelCase__		):
					A__	:						List[str]								=				data
					A__	:						int
					A__	:						Node




def 					SCREAMING_SNAKE_CASE  (   __UpperCamelCase			:    Node							)			->							None:

				"""simple docstring"""







				A__	:						Any								=				0
				A__	:						Optional[int]								=				x

def 					SCREAMING_SNAKE_CASE  (   __UpperCamelCase			:    Node				,    __UpperCamelCase			:    Node							)			->							None:

				"""simple docstring"""







				A__							,				A__	:						str								=				find_set(__UpperCamelCase							), find_set(__UpperCamelCase							)
				if x == y:
								return

				elif x.rank > y.rank:
								A__	:						List[str]								=				x
				else:
								A__	:						List[str]								=				y
								if x.rank == y.rank:
												y.rank += 1

def 					SCREAMING_SNAKE_CASE  (   __UpperCamelCase			:    Node							)			->							Node:

				"""simple docstring"""







				if x != x.parent:
								A__	:						int								=				find_set(x.parent							)
				return x.parent

def 					SCREAMING_SNAKE_CASE  (   __UpperCamelCase			:    Node							)			->							set:

				"""simple docstring"""







				A__	:						Tuple								=				({0, 1, 2}, {3, 4, 5})
				for s in sets:
								if node.data in s:
												return s
				A__	:						Tuple								=				F"{node.data} is not in {sets}"
				raise ValueError(__UpperCamelCase							)

def 					SCREAMING_SNAKE_CASE  (   )			->							None:

				"""simple docstring"""







				A__	:						Union[str, Any]								=				[Node(__UpperCamelCase							) for i in range(6							)]
				for v in vertex:
								make_set(__UpperCamelCase							)

				union_set(vertex[0]				,    vertex[1]							)
				union_set(vertex[1]				,    vertex[2]							)
				union_set(vertex[3]				,    vertex[4]							)
				union_set(vertex[3]				,    vertex[5]							)

				for nodea in vertex:
								for nodea in vertex:
												if find_python_set(__UpperCamelCase							).isdisjoint(find_python_set(__UpperCamelCase							)							):
																assert find_set(__UpperCamelCase							) != find_set(__UpperCamelCase							)
												else:
																assert find_set(__UpperCamelCase							) == find_set(__UpperCamelCase							)


if __name__ == "__main__":
					test_disjoint_set()

def 					SCREAMING_SNAKE_CASE  (   __UpperCamelCase			:    list[int]							)			->							int:

				"""simple docstring"""







				if not isinstance(__UpperCamelCase				,    __UpperCamelCase							) or not all(
				    isinstance(__UpperCamelCase				,    __UpperCamelCase							) and item >= 0 for item in citations							):
								raise ValueError('''The citations should be a list of non negative integers.'''							)

				citations.sort()
				A__	:						str								=				len(__UpperCamelCase							)

				for i in range(__UpperCamelCase							):
								if citations[len_citations - 1 - i] <= i:
												return i

				return len_citations


if __name__ == "__main__":
					import doctest

					doctest.testmod()