'''simple docstring'''






def  UpperCamelCase__					(					_lowercase    :				int     )							->	list:

  '''simple docstring'''





  if bit_count < 0:
    raise ValueError("""The given input must be positive"""     )

  # get the generated string sequence
  __UpperCAmelCase:					int		= gray_code_sequence_string(__A     )
  #
  # convert them to integers
  for i in range(len(__A     )     ):
    __UpperCAmelCase:					Tuple		= int(sequence[i]   ,    2     )

  return sequence






def  UpperCamelCase__					(					_lowercase    :				int     )							->	list:

  '''simple docstring'''





  if bit_count == 0:
    return ["0"]

  if bit_count == 1:
    return ["0", "1"]

  __UpperCAmelCase:					Tuple		= 1 << bit_count  # defines the length of the sequence
  # 1<< n is equivalent to 2^n

  # recursive answer will generate answer for n-1 bits
  __UpperCAmelCase:					Union[str, Any]		= gray_code_sequence_string(bit_count - 1     )

  __UpperCAmelCase:					Optional[Any]		= []

  # append 0 to first half of the smaller sequence generated
  for i in range(seq_len // 2     ):
    __UpperCAmelCase:					Union[str, Any]		= '''0''' + smaller_sequence[i]
    sequence.append(__A     )

  # append 1 to second half ... start from the end of the list
  for i in reversed(range(seq_len // 2     )     ):
    __UpperCAmelCase:					Tuple		= '''1''' + smaller_sequence[i]
    sequence.append(__A     )

  return sequence


if __name__ == "__main__":
    import doctest

    doctest.testmod()
'''simple docstring'''






def  UpperCamelCase__					(					_lowercase    :				int     )							->	int:

  if not isinstance(_lowercase   ,    _lowercase     ):
    __UpperCAmelCase:					List[str]		= F'''Input value of [number={number}] must be an integer'''
    raise TypeError(_lowercase     )

  if number < 1:
    __UpperCAmelCase:					Dict		= F'''Input value of [number={number}] must be > 0'''
    raise ValueError(_lowercase     )

  __UpperCAmelCase:					int		= 1

  for i in range(1   ,    _lowercase     ):
    current_number *= 4 * i - 2
    current_number //= i + 1

  return current_number


if __name__ == "__main__":
    import doctest

    doctest.testmod()