



def 					lowerCAmelCase__  (							_SCREAMING_SNAKE_CASE    :     int			,       _SCREAMING_SNAKE_CASE    :     list[tuple[int, int, int]]      ):
				"""simple docstring"""







				__a					       =						sorted(_SCREAMING_SNAKE_CASE			,       key=lambda _SCREAMING_SNAKE_CASE      : edge[2]      )

				__a					       =						list(range(_SCREAMING_SNAKE_CASE      )      )

				def find_parent(_SCREAMING_SNAKE_CASE    :     Tuple      ):
								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(_SCREAMING_SNAKE_CASE      )
												__a					       =						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)





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


lowerCamelCase__     =	{"""configuration_hubert""": ["""HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """HubertConfig"""]}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__     =	[
						    """HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """HubertForCTC""",
						    """HubertForSequenceClassification""",
						    """HubertModel""",
						    """HubertPreTrainedModel""",
						]


try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__     =	[
						    """TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """TFHubertForCTC""",
						    """TFHubertModel""",
						    """TFHubertPreTrainedModel""",
						]

if TYPE_CHECKING:
						from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_hubert import (
												    HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    HubertForCTC,
												    HubertForSequenceClassification,
												    HubertModel,
												    HubertPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_hubert import (
												    TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFHubertForCTC,
												    TFHubertModel,
												    TFHubertPreTrainedModel,
												)


else:
						import sys

						lowerCamelCase__     =	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
