




"""simple docstring"""



# A Bipartite Graph is a graph whose vertices can be divided into two independent sets,
# U and V such that every edge (u, v) either connects a vertex from U to V or a vertex
# from V to U. In other words, for every edge (u, v), either u belongs to U and v to V,
# or u belongs to V and v to U. We can also say that there is no edge that connects
# vertices of same set.
from queue import Queue







def     _SCREAMING_SNAKE_CASE  (				lowercase_		)		->						Optional[Any]:
 A__			=							Queue()
 A__			=							[False] * len(SCREAMING_SNAKE_CASE_		)
 A__			=							[-1] * len(SCREAMING_SNAKE_CASE_		)

 def bfs():
  while not queue.empty():
   A__			=							queue.get()
   A__			=							True

   for neighbour in graph[u]:
    if neighbour == u:
     return False

    if color[neighbour] == -1:
     A__			=							1 - color[u]
     queue.put(SCREAMING_SNAKE_CASE_		)

    elif color[neighbour] == color[u]:
     return False

  return True

 for i in range(len(SCREAMING_SNAKE_CASE_		)		):
  if not visited[i]:
   queue.put(SCREAMING_SNAKE_CASE_		)
   A__			=							0
   if bfs() is False:
    return False

 return True


if __name__ == "__main__":
      # Adjacency List of graph
      print(check_bipartite({0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]}))












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))

