




import sys
from collections import defaultdict






class 					__magic_name__							:






				'''simple docstring'''





				def __init__( self				):





							"""simple docstring"""
							lowerCamelCase       =      []





				def      _lowerCAmelCase       ( self	,				_a				):





							"""simple docstring"""
							return self.node_position[vertex]





				def      _lowerCAmelCase       ( self	,				_a	,				_a				):





							"""simple docstring"""
							lowerCamelCase       =      pos





				def      _lowerCAmelCase       ( self	,				_a	,				_a	,				_a	,				_a				):





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

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

													self.top_to_bottom(UpperCamelCase_	,				UpperCamelCase_	,				UpperCamelCase_	,				UpperCamelCase_				)





				def      _lowerCAmelCase       ( self	,				_a	,				_a	,				_a	,				_a				):





							"""simple docstring"""
							lowerCamelCase       =      position[index]

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

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





				def      _lowerCAmelCase       ( self	,				_a	,				_a				):





							"""simple docstring"""
							lowerCamelCase       =      len(UpperCamelCase_				) // 2 - 1
							for i in range(UpperCamelCase_	,				-1	,				-1				):
										self.top_to_bottom(UpperCamelCase_	,				UpperCamelCase_	,				len(UpperCamelCase_				)	,				UpperCamelCase_				)





				def      _lowerCAmelCase       ( self	,				_a	,				_a				):





							"""simple docstring"""
							lowerCamelCase       =      positions[0]
							lowerCamelCase       =      sys.maxsize
							self.top_to_bottom(UpperCamelCase_	,				0	,				len(UpperCamelCase_				)	,				UpperCamelCase_				)
							return temp




def 					a__				(       snake_case__       )		->      str:
			lowerCamelCase       =      Heap()

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

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

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

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


if __name__ == "__main__":  # pragma: no cover
					# < --------- Prims Algorithm --------- >
					lowerCAmelCase							:    int  							=							int(input("""Enter number of edges: """).strip())
					lowerCAmelCase							:    Tuple  							=							defaultdict(list)
					for _ in range(edges_number):
										lowerCAmelCase							:    Dict  							=							[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 					a__				(       snake_case__       )		->      list:
			if n_term == "":
						return []
			lowerCamelCase       =      []
			for temp in range(int(snake_case__       )       ):
						series.append(F'1/{temp + 1}' if series else """1"""       )
			return series


if __name__ == "__main__":
					lowerCAmelCase							:    Optional[int]  							=							input("""Enter the last number (nth term) of the Harmonic Series""")
					print("""Formula of Harmonic Series => 1+1/2+1/3 ..... 1/n""")
					print(harmonic_series(nth_term))



