





"""simple docstring"""




def 	a_    (							_lowercase	,						_lowercase       ):
						return [sentence[i : i + ngram_size] for i in range(len(_lowercase       ) - ngram_size + 1       )]


if __name__ == "__main__":
						from doctest import testmod

						testmod()










"""simple docstring"""




class 			_a						:






				def __init__(			self		:   Optional[int],			lowerCAmelCase__		:   list							)     ->				None:




										'''simple docstring'''



										_UpperCamelCase      : Optional[int]         =   set_counts
										_UpperCamelCase      : Any         =   max(lowerCAmelCase__							)
										_UpperCamelCase      : int         =   len(lowerCAmelCase__							)
										_UpperCamelCase      : int         =   [1] * num_sets
										_UpperCamelCase      : List[Any]         =   list(range(lowerCAmelCase__							)							)






				def     snake_case     (			self		:   int,			lowerCAmelCase__		:   int,			lowerCAmelCase__		:   int							)     ->				bool:




										'''simple docstring'''



										_UpperCamelCase      : Optional[Any]         =   self.get_parent(lowerCAmelCase__							)
										_UpperCamelCase      : Any         =   self.get_parent(lowerCAmelCase__							)

										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]
																_UpperCamelCase      : List[Any]         =   0
																_UpperCamelCase      : str         =   dst_parent
																if self.ranks[dst_parent] == self.ranks[src_parent]:
																						self.ranks[dst_parent] += 1
																_UpperCamelCase      : Union[str, Any]         =   self.set_counts[dst_parent]
										else:
																self.set_counts[src_parent] += self.set_counts[dst_parent]
																_UpperCamelCase      : Tuple         =   0
																_UpperCamelCase      : Optional[Any]         =   src_parent
																_UpperCamelCase      : int         =   self.set_counts[src_parent]

										_UpperCamelCase      : Optional[Any]         =   max(self.max_set,			lowerCAmelCase__							)
										return True






				def     snake_case     (			self		:   Optional[Any],			lowerCAmelCase__		:   int							)     ->				int:




										'''simple docstring'''



										if self.parents[disj_set] == disj_set:
																return disj_set
										_UpperCamelCase      : Union[str, Any]         =   self.get_parent(self.parents[disj_set]							)
										return self.parents[disj_set]



