
"""simple docstring"""







class 			A__	:

		def __init__(				self	,		_SCREAMING_SNAKE_CASE			):
			__lowerCAmelCase      :						Any						      =				set_counts
			__lowerCAmelCase      :						List[Any]						      =				max(_SCREAMING_SNAKE_CASE			)
			__lowerCAmelCase      :						str						      =				len(_SCREAMING_SNAKE_CASE			)
			__lowerCAmelCase      :						Optional[int]						      =				[1] * num_sets
			__lowerCAmelCase      :						Any						      =				list(range(_SCREAMING_SNAKE_CASE			)			)

		def 							__lowerCamelCase							(				self	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE			):
			__lowerCAmelCase      :						str						      =				self.get_parent(_SCREAMING_SNAKE_CASE			)
			__lowerCAmelCase      :						Tuple						      =				self.get_parent(_SCREAMING_SNAKE_CASE			)

			if src_parent == dst_parent:
				return False

			if self.ranks[dst_parent] >= self.ranks[src_parent]:
				self.set_counts[dst_parent] += self.set_counts[src_parent]
				__lowerCAmelCase      :						List[str]						      =				0
				__lowerCAmelCase      :						Dict						      =				dst_parent
				if self.ranks[dst_parent] == self.ranks[src_parent]:
					self.ranks[dst_parent] += 1
				__lowerCAmelCase      :						Any						      =				self.set_counts[dst_parent]
			else:
				self.set_counts[src_parent] += self.set_counts[dst_parent]
				__lowerCAmelCase      :						int						      =				0
				__lowerCAmelCase      :						Union[str, Any]						      =				src_parent
				__lowerCAmelCase      :						List[Any]						      =				self.set_counts[src_parent]

			__lowerCAmelCase      :						int						      =				max(self.max_set	,		_SCREAMING_SNAKE_CASE			)
			return True







		def 							__lowerCamelCase							(				self	,		_SCREAMING_SNAKE_CASE			):
			if self.parents[disj_set] == disj_set:
				return disj_set
			__lowerCAmelCase      :						Optional[Any]						      =				self.get_parent(self.parents[disj_set]			)
			return self.parents[disj_set]

"""simple docstring"""







import warnings
from functools import wraps
from typing import Callable
def    __lowerCAmelCase    (_UpperCamelCase		):

	@wraps(_UpperCamelCase		)
	def _inner_fn(*_UpperCamelCase	,  **_UpperCamelCase		):
		warnings.warn(
		    (F"'{fn.__name__}' is experimental and might be subject to breaking changes in the future.")	,  _UpperCamelCase	,  )
		return fn(*_UpperCamelCase	,  **_UpperCamelCase		)

	return _inner_fn