




"""simple docstring"""

a         =      {0: [2, 3], 1: [0], 2: [1], 3: [4], 4: []}

a         =      {0: [1, 2, 3], 1: [2], 2: [0], 3: [4], 4: [5], 5: [3]}






def 						_snake_case					( _snake_case							: dict[int, list[int]]    ,  _snake_case							: int    ,  _snake_case							: list[bool]							)   -> list[int]:






      '''simple docstring'''


      _A        =       True
      _A        =       []

      for neighbour in graph[vert]:
            if not visited[neighbour]:
                  order += topology_sort(snake_case__    ,  snake_case__    ,  snake_case__							)

      order.append(snake_case__							)

      return order






def 						_snake_case					( _snake_case							: dict[int, list[int]]    ,  _snake_case							: int    ,  _snake_case							: list[bool]							)   -> list[int]:






      '''simple docstring'''


      _A        =       True
      _A        =       [vert]

      for neighbour in reversed_graph[vert]:
            if not visited[neighbour]:
                  component += find_components(snake_case__    ,  snake_case__    ,  snake_case__							)

      return component







def 						_snake_case					( _snake_case							: dict[int, list[int]]							)   -> list[list[int]]:






      '''simple docstring'''


      _A        =       len(snake_case__							) * [False]
      _A        =       {vert: [] for vert in range(len(snake_case__							)							)}

      for vert, neighbours in graph.items():
            for neighbour in neighbours:
                  reversed_graph[neighbour].append(snake_case__							)

      _A        =       []
      for i, was_visited in enumerate(snake_case__							):
            if not was_visited:
                  order += topology_sort(snake_case__    ,  snake_case__    ,  snake_case__							)

      _A        =       []
      _A        =       len(snake_case__							) * [False]

      for i in range(len(snake_case__							)							):
            _A        =       order[len(snake_case__							) - i - 1]
            if not visited[vert]:
                  _A        =       find_components(snake_case__    ,  snake_case__    ,  snake_case__							)
                  components_list.append(snake_case__							)

      return components_list







"""simple docstring"""

def 						_snake_case					( _snake_case							: int							)   -> list:






      '''simple docstring'''


      _A        =       int(_snake_case							)
      if n_element < 1:
            _A        =       ValueError('a should be a positive number'							)
            raise my_error

      _A        =       [1]
      _A       ,   _A       ,   _A        =       (0, 0, 0)
      _A        =       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__":
       a         =      input('''Enter the last number (nth term) of the Hamming Number Series: ''')
       print('''Formula of Hamming Number Series => 2^i * 3^j * 5^k''')
       a         =      hamming(int(n))
       print('''-----------------------------------------------------''')
       print(F'''The list with nth numbers is: {hamming_numbers}''')
       print('''-----------------------------------------------------''')

