



class        UpperCAmelCase_  :

						'''simple docstring'''




						def __init__(   self				,							_A		):







													'''simple docstring'''

													__SCREAMING_SNAKE_CASE									= set_counts
													__SCREAMING_SNAKE_CASE									= max(_A		)
													__SCREAMING_SNAKE_CASE									= len(_A		)
													__SCREAMING_SNAKE_CASE									= [1] * num_sets
													__SCREAMING_SNAKE_CASE									= list(range(_A		)		)






						def 	_A     (   self				,							_A				,							_A		):







													'''simple docstring'''

													__SCREAMING_SNAKE_CASE									= self.get_parent(_A		)
													__SCREAMING_SNAKE_CASE									= self.get_parent(_A		)

													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]
																				__SCREAMING_SNAKE_CASE									= 0
																				__SCREAMING_SNAKE_CASE									= dst_parent
																				if self.ranks[dst_parent] == self.ranks[src_parent]:
																											self.ranks[dst_parent] += 1
																				__SCREAMING_SNAKE_CASE									= self.set_counts[dst_parent]
													else:
																				self.set_counts[src_parent] += self.set_counts[dst_parent]
																				__SCREAMING_SNAKE_CASE									= 0
																				__SCREAMING_SNAKE_CASE									= src_parent
																				__SCREAMING_SNAKE_CASE									= self.set_counts[src_parent]

													__SCREAMING_SNAKE_CASE									= max(self.max_set				,							_A		)
													return True






						def 	_A     (   self				,							_A		):







													'''simple docstring'''

													if self.parents[disj_set] == disj_set:
																				return disj_set
													__SCREAMING_SNAKE_CASE									= self.get_parent(self.parents[disj_set]		)
													return self.parents[disj_set]











from ..utils import DummyObject, requires_backends

class        UpperCAmelCase_  (       metaclass=UpperCamelCase_	):

						'''simple docstring'''




						UpperCamelCase__      :			Optional[int]      =  ['''speech''']






						def __init__(   self				,							*_A				,							**_A		):







													'''simple docstring'''

													requires_backends(self				,							['speech']		)







class        UpperCAmelCase_  (       metaclass=UpperCamelCase_	):

						'''simple docstring'''




						UpperCamelCase__      :			Optional[int]      =  ['''speech''']






						def __init__(   self				,							*_A				,							**_A		):







													'''simple docstring'''

													requires_backends(self				,							['speech']		)






