
'''simple docstring'''







from __future__ import annotations

from collections import deque
from collections.abc import Iterator
from dataclasses import dataclass


@dataclass
class 			lowerCAmelCase :
		a							:					int
		a							:					int


class 			lowerCAmelCase :




		def __init__(				self					,						UpperCamelCase      ):
								_SCREAMING_SNAKE_CASE				= [[] for _ in range(A_      )]
								_SCREAMING_SNAKE_CASE				= size




		def __getitem__(				self					,						UpperCamelCase      ):
								return iter(self._graph[vertex]      )




		@property
		def     lowercase       (				self      ):
								return self._size




		def     lowercase       (				self					,						UpperCamelCase					,						UpperCamelCase					,						UpperCamelCase      ):
								if weight not in (0, 1):
														raise ValueError("Edge weight must be either 0 or 1."      )

								if to_vertex < 0 or to_vertex >= self.size:
														raise ValueError("Vertex indexes must be in [0; size)."      )

								self._graph[from_vertex].append(Edge(A_					,						A_      )      )




		def     lowercase       (				self					,						UpperCamelCase					,						UpperCamelCase      ):
								_SCREAMING_SNAKE_CASE				= deque([start_vertex]      )
								_SCREAMING_SNAKE_CASE				= [None] * self.size
								_SCREAMING_SNAKE_CASE				= 0

								while queue:
														_SCREAMING_SNAKE_CASE				= queue.popleft()
														_SCREAMING_SNAKE_CASE				= distances[current_vertex]
														if current_distance is None:
																				continue

														for edge in self[current_vertex]:
																				_SCREAMING_SNAKE_CASE				= current_distance + edge.weight
																				_SCREAMING_SNAKE_CASE				= distances[edge.destination_vertex]
																				if (
																				    isinstance(A_					,						A_      )
																				    and new_distance >= dest_vertex_distance
																				):
																										continue
																				_SCREAMING_SNAKE_CASE				= new_distance
																				if edge.weight == 0:
																										queue.appendleft(edge.destination_vertex      )
																				else:
																										queue.append(edge.destination_vertex      )

								if distances[finish_vertex] is None:
														raise ValueError("No path from start_vertex to finish_vertex."      )

								return distances[finish_vertex]


if __name__ == "__main__":
						import doctest

						doctest.testmod()

'''simple docstring'''







def 			_a		(	_SCREAMING_SNAKE_CASE		:   int  ):
						_SCREAMING_SNAKE_CASE				= int(_SCREAMING_SNAKE_CASE  )
						if n_element < 1:
												_SCREAMING_SNAKE_CASE				= ValueError("a should be a positive number"  )
												raise my_error

						_SCREAMING_SNAKE_CASE				= [1]
						_SCREAMING_SNAKE_CASE,							_SCREAMING_SNAKE_CASE,							_SCREAMING_SNAKE_CASE				= (0, 0, 0)
						_SCREAMING_SNAKE_CASE				= 1
						while index < n_element:
												while hamming_list[i] * 2 <= hamming_list[-1]:
																		i += 1
												while hamming_list[j] * 3 <= hamming_list[-1]:
																		j += 1
												while hamming_list[k] * 5 <= hamming_list[-1]:
																		k += 1
												hamming_list.append(
												    min(hamming_list[i] * 2	,			hamming_list[j] * 3	,			hamming_list[k] * 5  )  )
												index += 1
						return hamming_list


if __name__ == "__main__":
						_snake_case				:   int     =				input("""Enter the last number (nth term) of the Hamming Number Series: """)
						print("""Formula of Hamming Number Series => 2^i * 3^j * 5^k""")
						_snake_case				:   str     =				hamming(int(n))
						print("""-----------------------------------------------------""")
						print(F"The list with nth numbers is: {hamming_numbers}")
						print("""-----------------------------------------------------""")