


def 						_A						(						_lowercase			,       _lowercase				)			->				list[tuple[int, int, int]]:


     """simple docstring"""


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

     __UpperCamelCase				=	list(range(_lowercase				)				)

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

     return minimum_spanning_tree


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

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

    kruskal(num_nodes, edges)






import math






def 						_A						(						_lowercase				)			->				list:


     """simple docstring"""


     if n <= 0:
          raise ValueError('Only positive integers have prime factors'				)
     __UpperCamelCase				=	[]
     while n % 2 == 0:
          pf.append(2				)
          __UpperCamelCase				=	int(n / 2				)
     for i in range(3			,       int(math.sqrt(_lowercase				)				) + 1			,       2				):
          while n % i == 0:
               pf.append(_lowercase				)
               __UpperCamelCase				=	int(n / i				)
     if n > 2:
          pf.append(_lowercase				)
     return pf






def 						_A						(						_lowercase				)			->				int:


     """simple docstring"""


     if n <= 0:
          raise ValueError('Only positive numbers are accepted'				)
     __UpperCamelCase				=	1
     __UpperCamelCase				=	1
     while n % 2 == 0:
          temp += 1
          __UpperCamelCase				=	int(n / 2				)
     div *= temp
     for i in range(3			,       int(math.sqrt(_lowercase				)				) + 1			,       2				):
          __UpperCamelCase				=	1
          while n % i == 0:
               temp += 1
               __UpperCamelCase				=	int(n / i				)
          div *= temp
     if n > 1:
          div *= 2
     return div






def 						_A						(						_lowercase				)			->				int:


     """simple docstring"""


     if n <= 0:
          raise ValueError('Only positive numbers are accepted'				)
     __UpperCamelCase				=	1
     __UpperCamelCase				=	1
     while n % 2 == 0:
          temp += 1
          __UpperCamelCase				=	int(n / 2				)
     if temp > 1:
          s *= (2**temp - 1) / (2 - 1)
     for i in range(3			,       int(math.sqrt(_lowercase				)				) + 1			,       2				):
          __UpperCamelCase				=	1
          while n % i == 0:
               temp += 1
               __UpperCamelCase				=	int(n / i				)
          if temp > 1:
               s *= (i**temp - 1) / (i - 1)
     return int(_lowercase				)






def 						_A						(						_lowercase				)			->				int:


     """simple docstring"""


     __UpperCamelCase				=	n
     for x in set(prime_factors(_lowercase				)				):
          s *= (x - 1) / x
     return int(_lowercase				)


if __name__ == "__main__":
    import doctest

    doctest.testmod()


