




from math import cos, sin

def 			lowerCAmelCase_			(  lowerCamelCase:       float						)					->			list[list[float]]:


      '''simple docstring'''




      lowerCamelCase__        =				float(lowerCamelCase						)
      return [[scaling_factor * int(x == y						) for x in range(2						)] for y in range(2						)]

def 			lowerCAmelCase_			(  lowerCamelCase:       float						)					->			list[list[float]]:


      '''simple docstring'''




      lowerCamelCase__  ,		lowerCamelCase__        =				cos(lowerCamelCase						), sin(lowerCamelCase						)
      return [[c, -s], [s, c]]

def 			lowerCAmelCase_			(  lowerCamelCase:       float						)					->			list[list[float]]:


      '''simple docstring'''




      lowerCamelCase__  ,		lowerCamelCase__        =				cos(lowerCamelCase						), sin(lowerCamelCase						)
      lowerCamelCase__        =				c * s
      return [[c * c, cs], [cs, s * s]]

def 			lowerCAmelCase_			(  lowerCamelCase:       float						)					->			list[list[float]]:


      '''simple docstring'''




      lowerCamelCase__  ,		lowerCamelCase__        =				cos(lowerCamelCase						), sin(lowerCamelCase						)
      lowerCamelCase__        =				c * s
      return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(F"""    {scaling(5) = }""")
print(F"""  {rotation(45) = }""")
print(F"""{projection(45) = }""")


print(F"""{reflection(45) = }""")





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


      '''simple docstring'''




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

      lowerCamelCase__        =				list(range(lowerCamelCase						)						)

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

      lowerCamelCase__        =				0
      lowerCamelCase__        =				[]

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

      return minimum_spanning_tree


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

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

      kruskal(num_nodes, edges)