




def 					SCREAMING_SNAKE_CASE	(       __UpperCamelCase			:						int       ,     __UpperCamelCase			:						list[tuple[int, int, int]]      )  ->							list[tuple[int, int, int]]:
    UpperCAmelCase_							 =     sorted(__UpperCamelCase       ,     key=lambda __UpperCamelCase      : edge[2]      )

    UpperCAmelCase_							 =     list(range(__UpperCamelCase      )      )

    def find_parent(__UpperCamelCase			:						Tuple      ):
        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
 _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 List

import datasets
from datasets.tasks import ImageClassification

from ..folder_based_builder import folder_based_builder


_lowerCamelCase			 =						datasets.utils.logging.get_logger(__name__)



class 			a     (   folder_based_builder.FolderBasedBuilderConfig			):

     '''simple docstring'''





     lowerCAmelCase				:       bool   		=  None
     lowerCAmelCase				:       bool   		=  None



class 			a     (   folder_based_builder.FolderBasedBuilder			):

     '''simple docstring'''





     lowerCAmelCase				:       List[Any]   		=  datasets.Image()
     lowerCAmelCase				:       List[Any]   		=  'image'
     lowerCAmelCase				:       List[Any]   		=  ImageFolderConfig
     lowerCAmelCase				:       List[str]  # definition at the bottom of the script
     lowerCAmelCase				:       Dict   		=  ImageClassification(image_column='image'	,   label_column='label'			)


_lowerCamelCase			 =						[
    '.blp',
    '.bmp',
    '.dib',
    '.bufr',
    '.cur',
    '.pcx',
    '.dcx',
    '.dds',
    '.ps',
    '.eps',
    '.fit',
    '.fits',
    '.fli',
    '.flc',
    '.ftc',
    '.ftu',
    '.gbr',
    '.gif',
    '.grib',
    '.h5',
    '.hdf',
    '.png',
    '.apng',
    '.jp2',
    '.j2k',
    '.jpc',
    '.jpf',
    '.jpx',
    '.j2c',
    '.icns',
    '.ico',
    '.im',
    '.iim',
    '.tif',
    '.tiff',
    '.jfif',
    '.jpe',
    '.jpg',
    '.jpeg',
    '.mpg',
    '.mpeg',
    '.msp',
    '.pcd',
    '.pxr',
    '.pbm',
    '.pgm',
    '.ppm',
    '.pnm',
    '.psd',
    '.bw',
    '.rgb',
    '.rgba',
    '.sgi',
    '.ras',
    '.tga',
    '.icb',
    '.vda',
    '.vst',
    '.webp',
    '.wmf',
    '.emf',
    '.xbm',
    '.xpm',
]
_lowerCamelCase			 =						IMAGE_EXTENSIONS





