






def 						a_      (__A			)							->	Optional[Any]:



					"""simple docstring"""
					__a				:	Optional[int]			=				len(lowercase__			)
					for _ in range(
					    0							,					int(((no_of_elements - 1) / 2) + 1			)			):  # we don't need to traverse to end of list as
										for j in range(0							,					no_of_elements - 1			):
															if (
															    lst[j + 1] < lst[j]
															):  # applying bubble sort algorithm from left to right (or forwards)
																				__a				:	Dict			=				lst[j + 1]
																				__a				:	str			=				lst[j]
																				__a				:	str			=				temp
															if (
															    lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
															):  # applying bubble sort algorithm from right to left (or backwards)
																				__a				:	int			=				lst[no_of_elements - 1 - j]
																				__a				:	Optional[int]			=				lst[no_of_elements - 2 - j]
																				__a				:	List[Any]			=				temp
					return lst


if __name__ == "__main__":
		print('''enter the list to be sorted''')
		UpperCAmelCase__			 =	[int(x) for x in input().split()]  # inputing elements of the list in one line
		UpperCAmelCase__			 =	double_sort(lst)
		print('''the sorted list is''')
		print(sorted_lst)













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



					"""simple docstring"""
					__a				:	str			=				sorted(__A							,					key=lambda __A			: edge[2]			)

					__a				:	int			=				list(range(__A			)			)

					def find_parent(__A			):
										if i != parent[i]:
															__a				:	Optional[Any]			=				find_parent(parent[i]			)
										return parent[i]

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

					for edge in edges:
										__a				:	Any			=				find_parent(edge[0]			)
										__a				:	Optional[Any]			=				find_parent(edge[1]			)
										if parent_a != parent_b:
															minimum_spanning_tree_cost += edge[2]
															minimum_spanning_tree.append(__A			)
															__a				:	List[str]			=				parent_b

					return minimum_spanning_tree


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

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

			kruskal(num_nodes, edges)





