


"""simple docstring"""







from __future__ import annotations


def 	lowercase     (							A_    ,  A_			)-> str:
  '''simple docstring'''







  a		:						Any 				=     0
  a		:						List[Any] 				=     len(A_			) - 1
  while left <= right:
    a		:						Optional[Any] 				=     (left + right) // 2
    if left == right:
      if sorted_list[middle] < item:
        a		:						List[str] 				=     middle + 1
      break
    elif sorted_list[middle] < item:
      a		:						Dict 				=     middle + 1
    else:
      a		:						Optional[int] 				=     middle - 1
  sorted_list.insert(A_    ,  A_			)
  return sorted_list


def 	lowercase     (							A_    ,  A_			)-> int:
  '''simple docstring'''







  a		:						str 				=     []
  while left and right:
    if left[0][0] < right[0][0]:
      result.append(left.pop(0			)			)
    else:
      result.append(right.pop(0			)			)
  return result + left + right


def 	lowercase     (							A_			)-> str:
  '''simple docstring'''







  a		:						str 				=     len(A_			)
  if length <= 1:
    return list_ad
  a		:						Any 				=     length // 2
  return merge(sortlist_ad(list_ad[:middle]			)    ,  sortlist_ad(list_ad[middle:]			)			)


def 	lowercase     (							A_			)-> list[int]:
  '''simple docstring'''







  if len(A_			) <= 1:
    return collection
  a		:						Optional[int] 				=     []
  a		:						Any 				=     False
  for i in range(0    ,  len(A_			)    ,  2			):
    if i == len(A_			) - 1:
      a		:						int 				=     True
    else:
      if collection[i] < collection[i + 1]:
        two_paired_list.append([collection[i], collection[i + 1]]			)
      else:
        two_paired_list.append([collection[i + 1], collection[i]]			)
  a		:						List[Any] 				=     sortlist_ad(A_			)
  a		:						Tuple 				=     [i[0] for i in sorted_list_ad]
  result.append(sorted_list_ad[-1][1]			)
  if has_last_odd_item:
    a		:						List[Any] 				=     collection[-1]
    a		:						Any 				=     binary_search_insertion(A_    ,  A_			)
  a		:						Optional[int] 				=     False
  for i in range(len(A_			) - 1			):
    if result[i] == collection[-1] and has_last_odd_item:
      a		:						Optional[Any] 				=     True
    a		:						Any 				=     sorted_list_ad[i][1]
    # If last_odd_item is inserted before the item's index,
    # you should forward index one more.
    if is_last_odd_item_inserted_before_this_index:
      a		:						Any 				=     result[: i + 2] + binary_search_insertion(result[i + 2 :]    ,  A_			)
    else:
      a		:						str 				=     result[: i + 1] + binary_search_insertion(result[i + 1 :]    ,  A_			)

  return result


if __name__ == "__main__":
 __lowercase          = input("""Enter numbers separated by a comma:\n""").strip()
 __lowercase          = [int(item) for item in user_input.split(""",""")]
 print(merge_insertion_sort(unsorted))










"""simple docstring"""







def 	lowercase     (							A_    ,  A_			)-> list[tuple[int, int, int]]:
  '''simple docstring'''







  a		:						Union[str, Any] 				=     sorted(A_    ,  key=lambda A_			: edge[2]			)

  a		:						List[Any] 				=     list(range(A_			)			)

  def find_parent(A_			):
    if i != parent[i]:
      a		:						Dict 				=     find_parent(parent[i]			)
    return parent[i]

  a		:						Optional[Any] 				=     0
  a		:						Optional[int] 				=     []

  for edge in edges:
    a		:						List[str] 				=     find_parent(edge[0]			)
    a		:						int 				=     find_parent(edge[1]			)
    if parent_a != parent_b:
      minimum_spanning_tree_cost += edge[2]
      minimum_spanning_tree.append(A_			)
      a		:						Tuple 				=     parent_b

  return minimum_spanning_tree


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

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

 kruskal(num_nodes, edges)






