





"""simple docstring"""




from ..utils import deprecate
from .attention_processor import (  # noqa: F401
    Attention,
    AttentionProcessor,
    AttnAddedKVProcessor,
    AttnProcessor2_0,
    LoRAAttnProcessor,
    LoRALinearLayer,
    LoRAXFormersAttnProcessor,
    SlicedAttnAddedKVProcessor,
    SlicedAttnProcessor,
    XFormersAttnProcessor,
)
from .attention_processor import AttnProcessor as AttnProcessorRename  # noqa: F401


deprecate(
    """cross_attention""",
    """0.20.0""",
    """Importing from cross_attention is deprecated. Please import from diffusers.models.attention_processor instead.""",
    standard_warn=False,
)


UpperCamelCase_	 =AttentionProcessor




class 					_a		( _lowerCAmelCase							):






				def __init__(					self						:       Any,					*lowerCAmelCase__						:       Optional[int],					**lowerCAmelCase__						:       str				)      -> int:




										'''simple docstring'''



										_UpperCamelCase     :   List[str]      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)




class 					_a		( _lowerCAmelCase							):






				def __init__(					self						:       str,					*lowerCAmelCase__						:       Any,					**lowerCAmelCase__						:       Any				)      -> Dict:




										'''simple docstring'''



										_UpperCamelCase     :   List[str]      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)




class 					_a		( _lowerCAmelCase							):






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




										'''simple docstring'''



										_UpperCamelCase     :   int      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)




class 					_a		( _lowerCAmelCase							):






				def __init__(					self						:       Any,					*lowerCAmelCase__						:       List[str],					**lowerCAmelCase__						:       List[str]				)      -> str:




										'''simple docstring'''



										_UpperCamelCase     :   str      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)




class 					_a		( _lowerCAmelCase							):






				def __init__(					self						:       Optional[Any],					*lowerCAmelCase__						:       Any,					**lowerCAmelCase__						:       List[str]				)      -> Union[str, Any]:




										'''simple docstring'''



										_UpperCamelCase     :   Optional[Any]      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)




class 					_a		( _lowerCAmelCase							):






				def __init__(					self						:       Tuple,					*lowerCAmelCase__						:       Optional[Any],					**lowerCAmelCase__						:       Union[str, Any]				)      -> Tuple:




										'''simple docstring'''



										_UpperCamelCase     :   int      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)




class 					_a		( _lowerCAmelCase							):






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




										'''simple docstring'''



										_UpperCamelCase     :   str      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)




class 					_a		( _lowerCAmelCase							):






				def __init__(					self						:       Tuple,					*lowerCAmelCase__						:       int,					**lowerCAmelCase__						:       Dict				)      -> List[str]:




										'''simple docstring'''



										_UpperCamelCase     :   Optional[int]      =       f"""{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'				)				)} instead."""
										deprecate('''cross_attention''',					'''0.20.0''',					lowerCAmelCase__,					standard_warn=lowerCAmelCase__				)
										super().__init__(*lowerCAmelCase__,					**lowerCAmelCase__				)





"""simple docstring"""







def        __lowerCAmelCase							(_UpperCamelCase			,    _UpperCamelCase						):
	__lowerCAmelCase     :		Any		     = sorted(_UpperCamelCase			,    key=lambda _UpperCamelCase						: edge[2]						)

	__lowerCAmelCase     :		Union[str, Any]		     = list(range(_UpperCamelCase						)						)

	def find_parent(_UpperCamelCase						):
		if i != parent[i]:
			__lowerCAmelCase     :		int		     = find_parent(parent[i]						)
		return parent[i]

	__lowerCAmelCase     :		Optional[Any]		     = 0
	__lowerCAmelCase     :		List[str]		     = []

	for edge in edges:
		__lowerCAmelCase     :		List[str]		     = find_parent(edge[0]						)
		__lowerCAmelCase     :		Optional[Any]		     = find_parent(edge[1]						)
		if parent_a != parent_b:
			minimum_spanning_tree_cost += edge[2]
			minimum_spanning_tree.append(_UpperCamelCase						)
			__lowerCAmelCase     :		Optional[Any]		     = parent_b

	return minimum_spanning_tree


if __name__ == "__main__":  # pragma: no cover
							lowerCamelCase__   ,		lowerCamelCase__     =						list(map(int, input().strip().split()))
							lowerCamelCase__     =						[]

							for _ in range(num_edges):
														lowerCamelCase__   ,		lowerCamelCase__   ,		lowerCamelCase__     =						(int(x) for x in input().strip().split())
														edges.append((nodea, nodea, cost))

							kruskal(num_nodes, edges)