
def 						A_			(				snake_case				: int			,   snake_case				: list[tuple[int, int, int]]			)   ->     list[tuple[int, int, int]]:



						'''simple docstring'''

						__UpperCamelCase  	=      sorted(snake_case			,   key=lambda snake_case			: edge[2]			)

						__UpperCamelCase  	=      list(range(snake_case			)			)

						def find_parent(snake_case				: Dict			):
												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(snake_case			)
																		__UpperCamelCase  	=      parent_b

						return minimum_spanning_tree


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

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

				kruskal(num_nodes, edges)








import numpy as np

_UpperCAmelCase      :	int  =[
    ["""a""", """b""", """c""", """d""", """e"""],
    ["""f""", """g""", """h""", """i""", """k"""],
    ["""l""", """m""", """n""", """o""", """p"""],
    ["""q""", """r""", """s""", """t""", """u"""],
    ["""v""", """w""", """x""", """y""", """z"""],
]







class 					snake_case__:







						'''simple docstring'''




						def __init__(					self				)       ->     None:
										lowerCAmelCase_			:   List[Any]     					=					np.array(__lowercase				)




						def     lowercase_			(					self ,    __lowercase				)       ->     np.ndarray:
										lowerCAmelCase_					,	lowerCAmelCase_			:   List[str]     					=					np.where(letter == self.SQUARE				)
										lowerCAmelCase_			:   Union[str, Any]     					=					np.concatenate([indexa + 1, indexa + 1]				)
										return indexes




						def     lowercase_			(					self ,    __lowercase ,    __lowercase				)       ->     str:
										return self.SQUARE[indexa - 1, indexa - 1]




						def     lowercase_			(					self ,    __lowercase				)       ->     str:
										lowerCAmelCase_			:   Dict     					=					message.lower()
										lowerCAmelCase_			:   Any     					=					message.replace('''j''' ,    '''i'''				)

										lowerCAmelCase_			:   Optional[Any]     					=					''''''
										for letter_index in range(len(__lowercase				)				):
														if message[letter_index] != " ":
																		lowerCAmelCase_			:   Optional[Any]     					=					self.letter_to_numbers(message[letter_index]				)
																		lowerCAmelCase_			:   List[Any]     					=					encoded_message + str(numbers[0]				) + str(numbers[1]				)
														elif message[letter_index] == " ":
																		lowerCAmelCase_			:   Optional[Any]     					=					encoded_message + ''' '''

										return encoded_message




						def     lowercase_			(					self ,    __lowercase				)       ->     str:
										lowerCAmelCase_			:   List[str]     					=					message.replace(''' ''' ,    '''  '''				)
										lowerCAmelCase_			:   Union[str, Any]     					=					''''''
										for numbers_index in range(int(len(__lowercase				) / 2				)				):
														if message[numbers_index * 2] != " ":
																		lowerCAmelCase_			:   Any     					=					message[numbers_index * 2]
																		lowerCAmelCase_			:   Dict     					=					message[numbers_index * 2 + 1]

																		lowerCAmelCase_			:   Dict     					=					self.numbers_to_letter(int(__lowercase				) ,    int(__lowercase				)				)
																		lowerCAmelCase_			:   Tuple     					=					decoded_message + letter
														elif message[numbers_index * 2] == " ":
																		lowerCAmelCase_			:   List[str]     					=					decoded_message + ''' '''

										return decoded_message