




'''simple docstring'''







def 						snake_case_							(_a     :							int   ,       _a     :							list[tuple[int, int, int]]					):
    UpperCAmelCase      	=		sorted(_a   ,       key=lambda _a					: edge[2]					)

    UpperCAmelCase      	=		list(range(_a					)					)

    def find_parent(_a     :							str					):
        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(_a					)
            UpperCAmelCase      	=		parent_b

    return minimum_spanning_tree


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

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

   kruskal(num_nodes, edges)










'''simple docstring'''







def 						snake_case_							(_a     :							int = 9_9_8_0_0_1					):
    UpperCAmelCase      	=		0
    for i in range(9_9_9   ,       9_9   ,       -1					):  # 3 digit numbers range from 999 down to 100
        for j in range(9_9_9   ,       9_9   ,       -1					):
            UpperCAmelCase      	=		str(i * j					)
            if product_string == product_string[::-1] and i * j < n:
                UpperCAmelCase      	=		max(_a   ,       i * j					)
    return answer


if __name__ == "__main__":
   print(f"""{solution() = }""")




