






'''simple docstring'''


def 						__magic_name__(			_A    ,   _A    ,   _A       ):
						'''simple docstring'''





						if power < 0:
												return -1
						base %= mod
						UpperCamelCase__       =			1

						while power > 0:
												if power & 1:
																		UpperCamelCase__       =			(result * base) % mod
												UpperCamelCase__       =			power >> 1
												UpperCamelCase__       =			(base * base) % mod

						return result







def 						__magic_name__(			):
						'''simple docstring'''





						print(modular_exponential(3    ,   200    ,   13       )       )


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					main()








'''simple docstring'''


lowerCamelCase_					:			List[Any]     						=				{0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

lowerCamelCase_					:			Tuple     						=				{0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}







def 						__magic_name__(			_A    ,   _A    ,   _A       ):
						'''simple docstring'''





						UpperCamelCase__       =			True
						UpperCamelCase__       =			[]

						for neighbour in graph[vert]:
												if not visited[neighbour]:
																		connected_verts += dfs(_A    ,   _A    ,   _A       )

						return [vert, *connected_verts]







def 						__magic_name__(			_A       ):
						'''simple docstring'''





						UpperCamelCase__       =			len(_A       )
						UpperCamelCase__       =			graph_size * [False]
						UpperCamelCase__       =			[]

						for i in range(_A       ):
												if not visited[i]:
																		UpperCamelCase__       =			dfs(_A    ,   _A    ,   _A       )
																		components_list.append(_A       )

						return components_list


if __name__ == "__main__":
					import doctest

					doctest.testmod()
