
'''simple docstring'''





from __future__ import annotations





def        snake_case							(		UpperCAmelCase      ,  UpperCAmelCase	)->			int:







      """simple docstring"""
      __A	,      __A       	=			0, len(UpperCAmelCase	) - 1
      while start_ind <= end_ind:
            if array[start_ind] == search_item:
                  return start_ind
            elif array[end_ind] == search_item:
                  return end_ind
            else:
                  start_ind += 1
                  end_ind -= 1
    # returns -1 if search_item is not found in array
      return -1


if __name__ == "__main__":
 print(double_linear_search(list(range(1_0_0)), 4_0))








'''simple docstring'''





def        snake_case							(		UpperCAmelCase      ,  UpperCAmelCase      ,  UpperCAmelCase	)->			str:







      """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(UpperCAmelCase      ,  n - 1      ,  UpperCAmelCase	) * a) % b

      __A       	=			bin_exp_mod(UpperCAmelCase      ,  n / 2      ,  UpperCAmelCase	)
      return (r * r) % b


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

 print(bin_exp_mod(BASE, POWER, MODULO))






