



'''simple docstring'''

class 		lowerCamelCase__   :




					'''simple docstring'''



					def __init__(	self					:						Union[str, Any]  ,	UpperCamelCase_					:						int       )	->							Optional[Any]:



						'''simple docstring'''





						_lowercase       :							List[str]  	=		data
						_lowercase       :							int
						_lowercase       :							Node







def     __UpperCamelCase					(				_lowercase       )			->      None:
	_lowercase       :							Any  	=		0
	_lowercase       :							int  	=		x







def     __UpperCamelCase					(				_lowercase,					_lowercase       )			->      None:
	_lowercase       :							List[Any]  	=		find_set(SCREAMING_SNAKE_CASE_       ), find_set(SCREAMING_SNAKE_CASE_       )
	if x == y:
		return

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







def     __UpperCamelCase					(				_lowercase       )			->      Node:
	if x != x.parent:
		_lowercase       :							Optional[Any]  	=		find_set(x.parent       )
	return x.parent







def     __UpperCamelCase					(				_lowercase       )			->      set:
	_lowercase       :							Union[str, Any]  	=		({0, 1, 2}, {3, 4, 5})
	for s in sets:
		if node.data in s:
			return s
	_lowercase       :							str  	=		f'''{node.data} is not in {sets}'''
	raise ValueError(SCREAMING_SNAKE_CASE_       )







def     __UpperCamelCase					(				)			->      None:
	_lowercase       :							Any  	=		[Node(SCREAMING_SNAKE_CASE_       ) for i in range(6       )]
	for v in vertex:
		make_set(SCREAMING_SNAKE_CASE_       )

	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(SCREAMING_SNAKE_CASE_       ).isdisjoint(find_python_set(SCREAMING_SNAKE_CASE_       )       ):
				assert find_set(SCREAMING_SNAKE_CASE_       ) != find_set(SCREAMING_SNAKE_CASE_       )
			else:
				assert find_set(SCREAMING_SNAKE_CASE_       ) == find_set(SCREAMING_SNAKE_CASE_       )


if __name__ == "__main__":
		test_disjoint_set()


import math
from decimal import Decimal, getcontext
def 					lowerCAmelCase__     (    SCREAMING_SNAKE_CASE_ = 4_000_000	)							->						int:

			try:
						lowerCAmelCase__ : str   =						int(SCREAMING_SNAKE_CASE_	)
			except (TypeError, ValueError):
						raise TypeError('Parameter n must be int or castable to int.'	)
			if n <= 0:
						raise ValueError('Parameter n must be greater than or equal to one.'	)
			lowerCAmelCase__ : Union[str, Any]   =						100
			lowerCAmelCase__ : List[Any]   =						(Decimal(5	) ** Decimal(0.5	) + 1) / Decimal(2	)

			lowerCAmelCase__ : Tuple   =						(math.floor(math.log(n * (phi + 2)			,				SCREAMING_SNAKE_CASE_	) - 1	) // 3) * 3 + 2
			lowerCAmelCase__ : Optional[int]   =						Decimal(round(phi ** Decimal(index + 1	)	)	) / (phi + 2)
			lowerCAmelCase__ : Tuple   =						num // 2
			return int(SCREAMING_SNAKE_CASE_	)


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