

'''simple docstring'''

import sys
from collections import defaultdict


class 	lowerCAmelCase  :







       def __init__(				self      :			str   ):







            """simple docstring"""







            __lowercase      		=[]







       def       snake_case (				self      :			List[Any]    ,   __lowercase      :			Any   ):







            """simple docstring"""







            return self.node_position[vertex]







       def       snake_case (				self      :			Any    ,   __lowercase      :			List[str]    ,   __lowercase      :			Union[str, Any]   ):







            """simple docstring"""







            __lowercase      		=pos







       def       snake_case (				self      :			str    ,   __lowercase      :			Dict    ,   __lowercase      :			List[str]    ,   __lowercase      :			Any    ,   __lowercase      :			Tuple   ):







            """simple docstring"""







            if start > size // 2 - 1:
                 return
            else:
                 if 2 * start + 2 >= size:
                      __lowercase      		=2 * start + 1
                 else:
                      if heap[2 * start + 1] < heap[2 * start + 2]:
                           __lowercase      		=2 * start + 1
                      else:
                           __lowercase      		=2 * start + 2
                 if heap[smallest_child] < heap[start]:
                      __lowercase		,  __lowercase      		=heap[smallest_child], positions[smallest_child]
                      __lowercase		,  __lowercase      		=(
                          heap[start],
                          positions[start],
                      )
                      __lowercase		,  __lowercase      		=temp, tempa

                      __lowercase      		=self.get_position(positions[smallest_child]   )
                      self.set_position(
                          positions[smallest_child]    ,   self.get_position(positions[start]   )   )
                      self.set_position(positions[start]    ,   __lowercase   )

                      self.top_to_bottom(__lowercase    ,   __lowercase    ,   __lowercase    ,   __lowercase   )







       def       snake_case (				self      :			Optional[int]    ,   __lowercase      :			List[str]    ,   __lowercase      :			Tuple    ,   __lowercase      :			Union[str, Any]    ,   __lowercase      :			str   ):







            """simple docstring"""







            __lowercase      		=position[index]

            while index != 0:
                 __lowercase      		=int((index - 2) / 2   ) if index % 2 == 0 else int((index - 1) / 2   )

                 if val < heap[parent]:
                      __lowercase      		=heap[parent]
                      __lowercase      		=position[parent]
                      self.set_position(position[parent]    ,   __lowercase   )
                 else:
                      __lowercase      		=val
                      __lowercase      		=temp
                      self.set_position(__lowercase    ,   __lowercase   )
                      break
                 __lowercase      		=parent
            else:
                 __lowercase      		=val
                 __lowercase      		=temp
                 self.set_position(__lowercase    ,   0   )







       def       snake_case (				self      :			List[Any]    ,   __lowercase      :			Optional[int]    ,   __lowercase      :			str   ):







            """simple docstring"""







            __lowercase      		=len(__lowercase   ) // 2 - 1
            for i in range(__lowercase    ,   -1    ,   -1   ):
                 self.top_to_bottom(__lowercase    ,   __lowercase    ,   len(__lowercase   )    ,   __lowercase   )







       def       snake_case (				self      :			Dict    ,   __lowercase      :			str    ,   __lowercase      :			Optional[int]   ):







            """simple docstring"""







            __lowercase      		=positions[0]
            __lowercase      		=sys.maxsize
            self.top_to_bottom(__lowercase    ,   0    ,   len(__lowercase   )    ,   __lowercase   )
            return temp






def 					__UpperCamelCase				(						lowercase__    :	Union[str, Any]			):






     '''simple docstring'''





     __lowercase      		=Heap()

     __lowercase      		=[0] * len(lowercase__			)
     __lowercase      		=[-1] * len(lowercase__			)  # Neighboring Tree Vertex of selected vertex
     # Minimum Distance of explored vertex with neighboring vertex of partial tree
     # formed in graph
     __lowercase      		=[]  # Heap of Distance of vertices from their neighboring vertex
     __lowercase      		=[]

     for vertex in range(len(lowercase__			)			):
          distance_tv.append(sys.maxsize			)
          positions.append(lowercase__			)
          heap.node_position.append(lowercase__			)

     __lowercase      		=[]
     __lowercase      		=1
     __lowercase      		=sys.maxsize
     for neighbor, distance in adjacency_list[0]:
          __lowercase      		=0
          __lowercase      		=distance
     heap.heapify(lowercase__,       lowercase__			)

     for _ in range(1,       len(lowercase__			)			):
          __lowercase      		=heap.delete_minimum(lowercase__,       lowercase__			)
          if visited[vertex] == 0:
               tree_edges.append((nbr_tv[vertex], vertex)			)
               __lowercase      		=1
               for neighbor, distance in adjacency_list[vertex]:
                    if (
                        visited[neighbor] == 0
                        and distance < distance_tv[heap.get_position(lowercase__			)]
                    ):
                         __lowercase      		=distance
                         heap.bottom_to_top(
                             lowercase__,       heap.get_position(lowercase__			),       lowercase__,       lowercase__			)
                         __lowercase      		=vertex
     return tree_edges


if __name__ == "__main__":  # pragma: no cover
       # < --------- Prims Algorithm --------- >
       UpperCAmelCase					 =	int(input('''Enter number of edges: ''').strip())
       UpperCAmelCase					 =	defaultdict(list)
       for _ in range(edges_number):
              UpperCAmelCase					 =	[int(x) for x in input().strip().split()]
              adjacency_list[edge[0]].append([edge[1], edge[2]])
              adjacency_list[edge[1]].append([edge[0], edge[2]])
       print(prisms_algorithm(adjacency_list))





'''simple docstring'''

def 					__UpperCamelCase				(						lowercase__    :	List[str],       lowercase__    :	Tuple			):






     '''simple docstring'''





     __lowercase      		=[0 for i in range(r + 1			)]
     # nc0 = 1
     __lowercase      		=1
     for i in range(1,       n + 1			):
          # to compute current row from previous row.
          __lowercase      		=min(lowercase__,       lowercase__			)
          while j > 0:
               c[j] += c[j - 1]
               j -= 1
     return c[r]







print(binomial_coefficient(n=10, r=5))


