

def  _snake_case		(snake_case_					:     Dict    ,       snake_case_					:     Union[str, Any]    ,       snake_case_					:     Union[str, Any]    ,       snake_case_					:     Union[str, Any]  )							->		str:
  if start == end:
    return start if lst[start] > item else start + 1
  if start > end:
    return start

  __UpperCAmelCase	:  Optional[int]		=     (start + end) // 2
  if lst[mid] < item:
    return binary_search(SCREAMING_SNAKE_CASE_    ,       SCREAMING_SNAKE_CASE_    ,       mid + 1    ,       SCREAMING_SNAKE_CASE_  )
  elif lst[mid] > item:
    return binary_search(SCREAMING_SNAKE_CASE_    ,       SCREAMING_SNAKE_CASE_    ,       SCREAMING_SNAKE_CASE_    ,       mid - 1  )
  else:
    return mid





def  _snake_case		(snake_case_					:     Optional[int]  )							->		str:
  __UpperCAmelCase	:  Union[str, Any]		=     len(SCREAMING_SNAKE_CASE_  )

  for index in range(1    ,       SCREAMING_SNAKE_CASE_  ):
    __UpperCAmelCase	:  Tuple		=     lst[index]
    __UpperCAmelCase	:  Optional[int]		=     binary_search(SCREAMING_SNAKE_CASE_    ,       SCREAMING_SNAKE_CASE_    ,       0    ,       index - 1  )
    __UpperCAmelCase	:  List[str]		=     lst[:pos] + [value] + lst[pos:index] + lst[index + 1 :]

  return lst





def  _snake_case		(snake_case_					:     Optional[int]    ,       snake_case_					:     List[str]  )							->		List[str]:
  if not left:
    return right

  if not right:
    return left

  if left[0] < right[0]:
    return [left[0], *merge(left[1:]    ,       SCREAMING_SNAKE_CASE_  )]

  return [right[0], *merge(SCREAMING_SNAKE_CASE_    ,       right[1:]  )]





def  _snake_case		(snake_case_					:     int  )							->		Any:
  __UpperCAmelCase	:  Dict		=     len(SCREAMING_SNAKE_CASE_  )
  __UpperCAmelCase	:  Optional[Any]		=     [], []
  __UpperCAmelCase	:  int		=     [lst[0]]
  __UpperCAmelCase	:  List[str]		=     []
  __UpperCAmelCase	:  Optional[int]		=     1
  while i < length:
    if lst[i] < lst[i - 1]:
      runs.append(SCREAMING_SNAKE_CASE_  )
      __UpperCAmelCase	:  List[Any]		=     [lst[i]]
    else:
      new_run.append(lst[i]  )
    i += 1
  runs.append(SCREAMING_SNAKE_CASE_  )

  for run in runs:
    sorted_runs.append(insertion_sort(SCREAMING_SNAKE_CASE_  )  )
  for run in sorted_runs:
    __UpperCAmelCase	:  Any		=     merge(SCREAMING_SNAKE_CASE_    ,       SCREAMING_SNAKE_CASE_  )

  return sorted_array





def  _snake_case		()							->		Tuple:
  __UpperCAmelCase	:  int		=     [5, 9, 10, 3, -4, 5, 178, 92, 46, -18, 0, 7]
  __UpperCAmelCase	:  List[str]		=     tim_sort(SCREAMING_SNAKE_CASE_  )
  print(SCREAMING_SNAKE_CASE_  )


if __name__ == "__main__":
      main()












def        A__						(							SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_		) ->  Dict:
		assert b != 0, "This cannot accept modulo that is == 0"
		if n == 0:
				return 1

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

		lowerCamelCase :			Tuple    		=bin_exp_mod(SCREAMING_SNAKE_CASE_				,							n / 2				,							SCREAMING_SNAKE_CASE_		)
		return (r * r) % b


if __name__ == "__main__":
				try:
								snake_case_				=      int(input('''Enter Base : ''').strip())
								snake_case_				=      int(input('''Enter Power : ''').strip())
								snake_case_				=      int(input('''Enter Modulo : ''').strip())
				except ValueError:
								print('''Invalid literal for integer''')

				print(bin_exp_mod(BASE, POWER, MODULO))

