
'''simple docstring'''





def snake_case_     (					lowercase__   ,       lowercase__		):
  UpperCAmelCase__      :					Union[str, Any]				       =							1  # To kept the Calculated Value
  # Since C(n, k) = C(n, n-k)
  if k > (n - k):
    UpperCAmelCase__      :					Optional[Any]				       =							n - k
  # Calculate C(n,k)
  for i in range(lowercase__		):
    result *= n - i
    result //= i + 1
  return result







def snake_case_     (					lowercase__		):
  return binomial_coefficient(2 * node_count   ,       lowercase__		) // (node_count + 1)







def snake_case_     (					lowercase__		):
  if n < 0:
    raise ValueError("factorial() not defined for negative values"		)
  UpperCAmelCase__      :					Optional[Any]				       =							1
  for i in range(1   ,       n + 1		):
    result *= i
  return result







def snake_case_     (					lowercase__		):
  return catalan_number(lowercase__		) * factorial(lowercase__		)


if __name__ == "__main__":
      SCREAMING_SNAKE_CASE     =       int(input("""Enter the number of nodes: """).strip() or 0)
      if node_count <= 0:
            raise ValueError("""We need some nodes to work with.""")
      print(
          F'Given {node_count} nodes, there are {binary_tree_count(node_count)} '
          F'binary trees and {catalan_number(node_count)} binary search trees.'
      )





'''simple docstring'''





def snake_case_     (					lowercase__		):

  if len(lowercase__		) <= 1:
    return [tuple(lowercase__		)]

  UpperCAmelCase__      :					Union[str, Any]				       =							[]

  def generate(lowercase__   ,       lowercase__		):
    UpperCAmelCase__      :					str				       =							[0] * n
    res.append(tuple(lowercase__		)		)

    UpperCAmelCase__      :					Any				       =							0
    while i < n:
      if c[i] < i:
        if i % 2 == 0:
          UpperCAmelCase__       ,			UpperCAmelCase__      :					str				       =							arr[i], arr[0]
        else:
          UpperCAmelCase__       ,			UpperCAmelCase__      :					Optional[Any]				       =							arr[i], arr[c[i]]
        res.append(tuple(lowercase__		)		)
        c[i] += 1
        UpperCAmelCase__      :					List[str]				       =							0
      else:
        UpperCAmelCase__      :					Dict				       =							0
        i += 1

  generate(len(lowercase__		)   ,       lowercase__		)
  return res


if __name__ == "__main__":
      SCREAMING_SNAKE_CASE     =       input("""Enter numbers separated by a comma:\n""").strip()
      SCREAMING_SNAKE_CASE     =       [int(item) for item in user_input.split(""",""")]
      print(heaps(arr))



