






'''simple docstring'''




from __future__ import annotations

from typing import Generic, TypeVar

lowerCAmelCase__ 							=    TypeVar('T')







class    __lowercase       (Generic[T]     ):

	def __init__(   self :    Union[str, Any]	,       UpperCAmelCase_ :    str):
			UpperCamelCase__					:       List[Any]       =       data
			UpperCamelCase__					:       Optional[int]       =       self
			UpperCamelCase__					:       List[Any]       =       0







class    __lowercase       (Generic[T]     ):

	def __init__(   self :    int):
			UpperCamelCase__					:       Tuple       =       {}

	def   __UpperCamelCase				(   self :    Dict	,       UpperCAmelCase_ :    List[Any]):
			UpperCamelCase__					:       List[str]       =       DisjointSetTreeNode(lowerCamelCase__)

	def   __UpperCamelCase				(   self :    Dict	,       UpperCAmelCase_ :    List[str]):
			UpperCamelCase__					:       List[str]       =       self.map[data]
			if elem_ref != elem_ref.parent:
					UpperCamelCase__					:       Union[str, Any]       =       self.find_set(elem_ref.parent.data)
			return elem_ref.parent

	def   __UpperCamelCase				(   self :    Any	,       UpperCAmelCase_ :    List[str]	,       UpperCAmelCase_ :    List[str]):
			# helper function for union operation
			if nodea.rank > nodea.rank:
					UpperCamelCase__					:       Dict       =       nodea
			else:
					UpperCamelCase__					:       Any       =       nodea
					if nodea.rank == nodea.rank:
							nodea.rank += 1





	def   __UpperCamelCase				(   self :    Union[str, Any]	,       UpperCAmelCase_ :    Optional[Any]	,       UpperCAmelCase_ :    Optional[int]):
			self.link(self.find_set(lowerCamelCase__)	,       self.find_set(lowerCamelCase__))







class    __lowercase       (Generic[T]     ):

	def __init__(   self :    Union[str, Any]):
			UpperCamelCase__					:       Any       =       {}

	def   __UpperCamelCase				(   self :    Any	,       UpperCAmelCase_ :    str):
			# add a node ONLY if its not present in the graph
			if node not in self.connections:
					UpperCamelCase__					:       Optional[int]       =       {}

	def   __UpperCamelCase				(   self :    Optional[int]	,       UpperCAmelCase_ :    int	,       UpperCAmelCase_ :    int	,       UpperCAmelCase_ :    Any):
			self.add_node(lowerCamelCase__)
			self.add_node(lowerCamelCase__)
			UpperCamelCase__					:       Dict       =       weight
			UpperCamelCase__					:       Any       =       weight





	def   __UpperCamelCase				(   self :    str):
			UpperCamelCase__					:       Tuple       =       []
			UpperCamelCase__					:       int       =       set()
			for start in self.connections:
					for end in self.connections[start]:
							if (start, end) not in seen:
									seen.add((end, start))
									edges.append((start, end, self.connections[start][end]))
			edges.sort(key=lambda UpperCAmelCase_: x[2])

			# creating the disjoint set
			UpperCamelCase__					:       Optional[Any]       =       DisjointSetTree[T]()
			for node in self.connections:
					disjoint_set.make_set(lowerCamelCase__)

			# MST generation
			UpperCamelCase__					:       int       =       0
			UpperCamelCase__					:       Optional[int]       =       0
			UpperCamelCase__					:       List[Any]       =       GraphUndirectedWeighted[T]()
			while num_edges < len(self.connections) - 1:
					UpperCamelCase__,						UpperCamelCase__,						UpperCamelCase__					:       Optional[Any]       =       edges[index]
					index += 1
					UpperCamelCase__					:       Optional[int]       =       disjoint_set.find_set(lowerCamelCase__)
					UpperCamelCase__					:       str       =       disjoint_set.find_set(lowerCamelCase__)
					if parent_u != parent_v:
							num_edges += 1
							graph.add_edge(lowerCamelCase__	,       lowerCamelCase__	,       lowerCamelCase__)
							disjoint_set.union(lowerCamelCase__	,       lowerCamelCase__)
			return graph










def      lowerCamelCase_						(			UpperCamelCase__							: str )	->			list:





				"""simple docstring"""


				if n_term == "":
								return []
				__lowerCamelCase									=       []
				for temp in range(int(UpperCamelCase__ ) ):
								series.append(F"""1/{temp + 1}""" if series else '1' )
				return series


if __name__ == "__main__":
					__A								=       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))


