




"""simple docstring"""




from __future__ import annotations



def 					a__				(       snake_case__       )		->      bool:
			lowerCamelCase       =      len(snake_case__       )
			# We need to create solution object to save path.
			lowerCamelCase       =      [[0 for _ in range(snake_case__       )] for _ in range(snake_case__       )]
			lowerCamelCase       =      run_maze(snake_case__ ,				0 ,				0 ,				snake_case__       )
			if solved:
						print("""\n""".join(str(snake_case__       ) for row in solutions       )       )
			else:
						print("""No solution exists!"""       )
			return solved



def 					a__				(       snake_case__ ,				snake_case__ ,				snake_case__ ,				snake_case__       )		->      bool:
			lowerCamelCase       =      len(snake_case__       )
			# Final check point.
			if i == j == (size - 1):
						lowerCamelCase       =      1
						return True

			lowerCamelCase       =      (not i < 0) and (not j < 0)  # Check lower bounds
			lowerCamelCase       =      (i < size) and (j < size)  # Check upper bounds

			if lower_flag and upper_flag:
						# check for already visited and block points.
						lowerCamelCase       =      (not solutions[i][j]) and (not maze[i][j])
						if block_flag:
									# check visited
									lowerCamelCase       =      1

									# check for directions
									if (
									    run_maze(snake_case__ ,				i + 1 ,				snake_case__ ,				snake_case__       )
									    or run_maze(snake_case__ ,				snake_case__ ,				j + 1 ,				snake_case__       )
									    or run_maze(snake_case__ ,				i - 1 ,				snake_case__ ,				snake_case__       )
									    or run_maze(snake_case__ ,				snake_case__ ,				j - 1 ,				snake_case__       )
									):
												return True

									lowerCamelCase       =      0
									return False
			return False


if __name__ == "__main__":
					import doctest

					doctest.testmod()









"""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))



