
"""simple docstring"""







def 					__lowerCAmelCase       (_UpperCamelCase ,						_UpperCamelCase ,						_UpperCamelCase	):
	if n == 0:
		return 1

	elif n % 2 == 1:
		return (binary_exponentiation(_UpperCamelCase ,						n - 1 ,						_UpperCamelCase	) * a) % mod

	else:
		__lowerCAmelCase    :		Dict		    =   binary_exponentiation(_UpperCamelCase ,						n / 2 ,						_UpperCamelCase	)
		return (b * b) % mod


# a prime number
lowerCamelCase__           =	701

lowerCamelCase__           =	1_000_000_000
lowerCamelCase__           =	10

# using binary exponentiation function, O(log(p)):
print((a / b) % p == (a * binary_exponentiation(b, p - 2, p)) % p)
print((a / b) % p == (a * b ** (p - 2)) % p)

"""simple docstring"""







def 					__lowerCAmelCase       (_UpperCamelCase ,						_UpperCamelCase = False	):

	if not isinstance(_UpperCamelCase ,						_UpperCamelCase	):
		__lowerCAmelCase    :		str		    =   F"Expected string as input, found {type(_UpperCamelCase	)}"
		raise ValueError(_UpperCamelCase	)
	if not isinstance(_UpperCamelCase ,						_UpperCamelCase	):
		__lowerCAmelCase    :		Union[str, Any]		    =   F"Expected boolean as use_pascal parameter, found {type(_UpperCamelCase	)}"
		raise ValueError(_UpperCamelCase	)

	__lowerCAmelCase    :		Tuple		    =   input_str.split('_'	)

	__lowerCAmelCase    :		int		    =   0 if use_pascal else 1

	__lowerCAmelCase    :		Any		    =   words[start_index:]

	__lowerCAmelCase    :		Any		    =   [word[0].upper() + word[1:] for word in words_to_capitalize]

	__lowerCAmelCase    :		Any		    =   '' if use_pascal else words[0]

	return "".join([initial_word, *capitalized_words]	)


if __name__ == "__main__":
							from doctest import testmod

							testmod()