




'''simple docstring'''






from math import sqrt




def 		a_( lowerCamelCase      )				->list[int]:






       '''simple docstring'''




       lowercase  :		Any						=      [1]
       for i in range(2   ,				int(sqrt(lowerCamelCase      )      ) + 1   ,				1      ):
              if number % i == 0:
                     values.append(lowerCamelCase      )
                     if int(number // i      ) != i:
                            values.append(int(number // i      )      )
       return sorted(lowerCamelCase      )




def 		a_( lowerCamelCase      )				->bool:






       '''simple docstring'''




       return sum(factors(lowerCamelCase      )      ) > n




def 		a_( lowerCamelCase      )				->bool:






       '''simple docstring'''




       lowercase  :		Any						=      factors(lowerCamelCase      )
       lowercase  :		List[Any]						=      len(lowerCamelCase      )
       lowercase  :		Any						=      [[0 for i in range(number + 1      )] for j in range(r + 1      )]
       for i in range(r + 1      ):
              lowercase  :		Optional[Any]						=      True

       for i in range(1   ,				number + 1      ):
              lowercase  :		int						=      False

       for i in range(1   ,				r + 1      ):
              for j in range(1   ,				number + 1      ):
                     if j < values[i - 1]:
                            lowercase  :		Optional[int]						=      subset[i - 1][j]
                     else:
                            lowercase  :		Tuple						=      subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

       return subset[r][number] != 0




def 		a_( lowerCamelCase      )				->bool:






       '''simple docstring'''




       return abundant(lowerCamelCase      ) and not semi_perfect(lowerCamelCase      )


if __name__ == "__main__":
      import doctest

      doctest.testmod(verbose=True)
      for number in (69, 70, 71):
            print(f'{number} is {"" if weird(number) else "not "}weird.')










'''simple docstring'''






def 		a_( lowerCamelCase   ,				lowerCamelCase      )				->list[tuple[int, int, int]]:






       '''simple docstring'''




       lowercase  :		Dict						=      sorted(lowerCamelCase   ,				key=lambda lowerCamelCase      : edge[2]      )

       lowercase  :		str						=      list(range(lowerCamelCase      )      )

       def find_parent(lowerCamelCase      ):
              if i != parent[i]:
                     lowercase  :		Optional[int]						=      find_parent(parent[i]      )
              return parent[i]

       lowercase  :		Union[str, Any]						=      0
       lowercase  :		Any						=      []

       for edge in edges:
              lowercase  :		Optional[Any]						=      find_parent(edge[0]      )
              lowercase  :		Any						=      find_parent(edge[1]      )
              if parent_a != parent_b:
                     minimum_spanning_tree_cost += edge[2]
                     minimum_spanning_tree.append(lowerCamelCase      )
                     lowercase  :		Optional[int]						=      parent_b

       return minimum_spanning_tree


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

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

      kruskal(num_nodes, edges)




