



def  lowercase    (				SCREAMING_SNAKE_CASE__    :		int			,    SCREAMING_SNAKE_CASE__    :		list[tuple[int, int, int]]			)					->       list[tuple[int, int, int]]:
 _snake_case      :					Any					=   sorted(SCREAMING_SNAKE_CASE__			,    key=lambda SCREAMING_SNAKE_CASE__			: edge[2]			)

 _snake_case      :					str					=   list(range(SCREAMING_SNAKE_CASE__			)			)

 def find_parent(SCREAMING_SNAKE_CASE__    :		Any			):
  if i != parent[i]:
   _snake_case      :					Union[str, Any]					=   find_parent(parent[i]			)
  return parent[i]

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

 for edge in edges:
  _snake_case      :					Dict					=   find_parent(edge[0]			)
  _snake_case      :					str					=   find_parent(edge[1]			)
  if parent_a != parent_b:
   minimum_spanning_tree_cost += edge[2]
   minimum_spanning_tree.append(SCREAMING_SNAKE_CASE__			)
   _snake_case      :					List[str]					=   parent_b

 return minimum_spanning_tree


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

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

  kruskal(num_nodes, edges)





def  lowercase    (				SCREAMING_SNAKE_CASE__    :		Any			)					->       Optional[int]:
 _snake_case      :					Any					=   [701, 301, 132, 57, 23, 10, 4, 1]
 for gap in gaps:
  for i in range(SCREAMING_SNAKE_CASE__			,    len(SCREAMING_SNAKE_CASE__			)			):
   _snake_case      :					List[Any]					=   collection[i]
   _snake_case      :					List[str]					=   i
   while j >= gap and collection[j - gap] > insert_value:
    _snake_case      :					int					=   collection[j - gap]
    j -= gap
   if j != i:
    _snake_case      :					Tuple					=   insert_value
 return collection


if __name__ == "__main__":
  from doctest import testmod

  testmod()
  a__      =		input("""Enter numbers separated by a comma:\n""").strip()
  a__      =		[int(item) for item in user_input.split(""",""")]
  print(shell_sort(unsorted))
