





def lowerCAmelCase__(__snake_case	,__snake_case							)    ->				list[tuple[int, int, int]]:







	'''simple docstring'''







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

	lowerCamelCase__        =		list(range(__snake_case							)							)

	def find_parent(__snake_case							):
		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(__snake_case							)
			lowerCamelCase__        =		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)










import os





def lowerCAmelCase__()    ->				int:







	'''simple docstring'''







	lowerCamelCase__        =		os.path.dirname(os.path.realpath(__snake_case							)							)
	lowerCamelCase__        =		os.path.join(__snake_case	,'''triangle.txt'''							)

	with open(__snake_case							) as in_file:
		lowerCamelCase__        =		[[int(__snake_case							) for i in line.split()] for line in in_file]

	while len(__snake_case							) != 1:
		lowerCamelCase__        =		triangle.pop()
		lowerCamelCase__        =		triangle[-1]
		for j in range(len(__snake_case							) - 1							):
			curr_row[j] += max(last_row[j]	,last_row[j + 1]							)
	return triangle[0][0]


if __name__ == "__main__":
			print(solution())



