'''simple docstring'''


def    _lowerCamelCase       ( lowerCamelCase_   :				int      ,	lowerCamelCase_   :				list[tuple[int, int, int]]  ):



     """simple docstring"""





     UpperCAmelCase_				:  Dict  = sorted(lowerCamelCase_      ,	key=lambda lowerCamelCase_  : edge[2]  )

     UpperCAmelCase_				:  List[str]  = list(range(lowerCamelCase_  )  )

     def find_parent(lowerCamelCase_   :				Optional[Any]  ):
          if i != parent[i]:
               UpperCAmelCase_				:  int  = find_parent(parent[i]  )
          return parent[i]

     UpperCAmelCase_				:  List[str]  = 0
     UpperCAmelCase_				:  Union[str, Any]  = []

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

     return minimum_spanning_tree


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

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

 kruskal(num_nodes, edges)












def    snake_case   (				A     )				->				str:




	'''simple docstring'''


	if not isinstance(A		,  A     ):
		lowerCamelCase_				:						int				  =				(
		    'operation can not be conducted on a object of type '
		    f"{type(A     ).__name__}"
		)
		raise TypeError(A     )
	lowerCamelCase_				:						List[Any]				  =				''
	for _ in range(0		,  32     ):
		bit_string += str(number % 2     )
		lowerCamelCase_				:						int				  =				number >> 1
	return bit_string






def    snake_case   (				A     )				->				str:




	'''simple docstring'''


	if number < 0:
		raise ValueError('the value of input must be positive'     )
	elif isinstance(A		,  A     ):
		raise TypeError('Input value must be a \'int\' type'     )
	elif isinstance(A		,  A     ):
		raise TypeError('\'<\' not supported between instances of \'str\' and \'int\''     )
	lowerCamelCase_				:						Any				  =				0
	# iterator over [1 to 32],since we are dealing with 32 bit integer
	for _ in range(1		,  33     ):
		# left shift the bits by unity
		lowerCamelCase_				:						Any				  =				result << 1
		# get the end bit
		lowerCamelCase_				:						Any				  =				number % 2
		# right shift the bits by unity
		lowerCamelCase_				:						Optional[Any]				  =				number >> 1
		# add that bit to our ans
		lowerCamelCase_				:						Dict				  =				result | end_bit
	return get_reverse_bit_string(A     )


if __name__ == "__main__":
							import doctest

							doctest.testmod()
