




'''simple docstring'''
def 							snake_case_    (  a__						:      str       ,a__						:      Tuple       ,a__						:      Union[str, Any]     ):



    """simple docstring"""




    assert b != 0, "This cannot accept modulo that is == 0"
    if n == 0:
        return 1

    if n % 2 == 1:
        return (bin_exp_mod(a__       ,n - 1       ,a__     ) * a) % b

    __lowercase     							=		bin_exp_mod(a__       ,n / 2       ,a__     )
    return (r * r) % b


if __name__ == "__main__":
  try:
    A				: int					      =			int(input("""Enter Base : """).strip())
    A				: List[str]					      =			int(input("""Enter Power : """).strip())
    A				: Dict					      =			int(input("""Enter Modulo : """).strip())
  except ValueError:
    print("""Invalid literal for integer""")

  print(bin_exp_mod(BASE, POWER, MODULO))










'''simple docstring'''
import numpy as np
def 							snake_case_    (  a__						:      Tuple     ):



    """simple docstring"""




    __lowercase							,__lowercase     							=		a.shape
    __lowercase     							=		min(a__       ,a__     )
    __lowercase     							=		np.eye(a__     )
    __lowercase     							=		a.copy()

    for k in range(t - 1     ):
        # select a column of modified matrix A':
        __lowercase     							=		r[k:, [k]]
        # construct first basis vector
        __lowercase     							=		np.zeros_like(a__     )
        __lowercase     							=		1.0
        # determine scaling factor
        __lowercase     							=		np.linalg.norm(a__     )
        # construct vector v for Householder reflection
        __lowercase     							=		x + np.sign(x[0]     ) * alpha * ea
        v /= np.linalg.norm(a__     )

        # construct the Householder matrix
        __lowercase     							=		np.eye(m - k     ) - 2.0 * v @ v.T
        # pad with ones and zeros as necessary
        __lowercase     							=		np.block([[np.eye(a__     ), np.zeros((k, m - k)     )], [np.zeros((m - k, k)     ), q_k]]     )

        __lowercase     							=		q @ q_k.T
        __lowercase     							=		q_k @ r

    return q, r


if __name__ == "__main__":
  import doctest

  doctest.testmod()




