





'''simple docstring'''






def        UpperCamelCase__		(						__magic_name__  :   List[Any]      )				->			Tuple:
 '''simple docstring'''






 if not head:
  return True
 # split the list to two parts
 snake_case__  ,							snake_case__     :					Dict    =  head.next, head
 while fast and fast.next:
  snake_case__     :					Any    =  fast.next.next
  snake_case__     :					int    =  slow.next
 snake_case__     :					Dict    =  slow.next
 snake_case__     :					List[str]    =  None  # Don't forget here! But forget still works!
 # reverse the second part
 snake_case__     :					Tuple    =  None
 while second:
  snake_case__     :					Tuple    =  second.next
  snake_case__     :					Any    =  node
  snake_case__     :					str    =  second
  snake_case__     :					Optional[Any]    =  nxt
 # compare two parts
 # second part has the same or one less node
 while node:
  if node.val != head.val:
   return False
  snake_case__     :					List[Any]    =  node.next
  snake_case__     :					int    =  head.next
 return True



def        UpperCamelCase__		(						__magic_name__  :   Any      )				->			Optional[Any]:
 '''simple docstring'''






 if not head or not head.next:
  return True

 # 1. Get the midpoint (slow)
 snake_case__     :					List[Any]    =  head
 while fast and fast.next:
  snake_case__  ,							snake_case__     :					Any    =  fast.next.next, slow.next

 # 2. Push the second half into the stack
 snake_case__     :					Tuple    =  [slow.val]
 while slow.next:
  snake_case__     :					Optional[Any]    =  slow.next
  stack.append(slow.val      )

 # 3. Comparison
 while stack:
  if stack.pop() != cur.val:
   return False
  snake_case__     :					str    =  cur.next

 return True





def        UpperCamelCase__		(						__magic_name__  :   Optional[Any]      )				->			Tuple:
 '''simple docstring'''






 if not head or not head.next:
  return True
 snake_case__     :					int    =  {}
 snake_case__     :					Union[str, Any]    =  0
 while head:
  if head.val in d:
   d[head.val].append(__magic_name__      )
  else:
   snake_case__     :					Tuple    =  [pos]
  snake_case__     :					Optional[Any]    =  head.next
  pos += 1
 snake_case__     :					int    =  pos - 1
 snake_case__     :					str    =  0
 for v in d.values():
  if len(__magic_name__      ) % 2 != 0:
   middle += 1
  else:
   snake_case__     :					List[str]    =  0
   for i in range(0		,       len(__magic_name__      )      ):
    if v[i] + v[len(__magic_name__      ) - 1 - step] != checksum:
     return False
    step += 1
  if middle > 1:
   return False
 return True








'''simple docstring'''
def 	_A  (       A							)  ->				list:
	lowercase						:		str   					=		int(A							)
	if n_element < 1:
		lowercase						:		List[Any]   					=		ValueError("a should be a positive number"							)
		raise my_error

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


