






def __A       ( __lowerCAmelCase					,						__lowerCAmelCase      )->    list[tuple[int, int, int]]:





						"""simple docstring"""



						_UpperCAmelCase							   =     sorted(UpperCamelCase__					,						key=lambda __lowerCAmelCase      : edge[2]      )

						_UpperCAmelCase							   =     list(range(UpperCamelCase__      )      )

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

						_UpperCAmelCase							   =     0
						_UpperCAmelCase							   =     []

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

						return minimum_spanning_tree


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

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

		kruskal(num_nodes, edges)





'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import _LazyModule


_lowercase       :						List[str]						={"tokenization_bert_japanese": ["BertJapaneseTokenizer", "CharacterTokenizer", "MecabTokenizer"]}


if TYPE_CHECKING:
				from .tokenization_bert_japanese import BertJapaneseTokenizer, CharacterTokenizer, MecabTokenizer

else:
				import sys

				_lowercase       :						Dict						=_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




