






def   SCREAMING_SNAKE_CASE__						(   snake_case_,  snake_case_  )   ->  list[tuple[int, int, int]]:


 """simple docstring"""



 a		=			sorted(lowerCamelCase__,  key=lambda snake_case_  : edge[2]  )

 a		=			list(range(lowerCamelCase__  )  )

 def find_parent(snake_case_  ):
  if i != parent[i]:
   a		=			find_parent(parent[i]  )
  return parent[i]

 a		=			0
 a		=			[]

 for edge in edges:
  a		=			find_parent(edge[0]  )
  a		=			find_parent(edge[1]  )
  if parent_a != parent_b:
   minimum_spanning_tree_cost += edge[2]
   minimum_spanning_tree.append(lowerCamelCase__  )
   a		=			parent_b

 return minimum_spanning_tree


if __name__ == "__main__":  # pragma: no cover
    UpperCamelCase__		,    UpperCamelCase__						:      Optional[Any]								=					list(map(int, input().strip().split()))
    UpperCamelCase__						:      List[str]								=					[]

    for _ in range(num_edges):
        UpperCamelCase__		,    UpperCamelCase__		,    UpperCamelCase__						:      Union[str, Any]								=					(int(x) for x in input().strip().split())
        edges.append((nodea, nodea, cost))

    kruskal(num_nodes, edges)













from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase__						:      int								=					{
    """configuration_fsmt""": ["""FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FSMTConfig"""],
    """tokenization_fsmt""": ["""FSMTTokenizer"""],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase__						:      Any								=					["""FSMTForConditionalGeneration""", """FSMTModel""", """PretrainedFSMTModel"""]


if TYPE_CHECKING:
				from .configuration_fsmt import FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP, FSMTConfig
				from .tokenization_fsmt import FSMTTokenizer

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_fsmt import FSMTForConditionalGeneration, FSMTModel, PretrainedFSMTModel

else:
				import sys

				UpperCamelCase__						:      List[Any]								=					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





