
def 						A_			(				snake_case				: Tuple			,   snake_case				: Optional[int]			)   ->     Tuple:



						'''simple docstring'''

						__UpperCamelCase  	=      1
						while b > 0:
												if b & 1:
																		res *= a

												a *= a
												b >>= 1

						return res




def 						A_			(				snake_case				: Optional[Any]			,   snake_case				: Any			,   snake_case				: Any			)   ->     Dict:



						'''simple docstring'''

						__UpperCamelCase  	=      1
						while b > 0:
												if b & 1:
																		__UpperCamelCase  	=      ((res % c) * (a % c)) % c

												a *= a
												b >>= 1

						return res







"""simple docstring"""




SCREAMING_SNAKE_CASE_  :      Optional[int]							=      {0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

SCREAMING_SNAKE_CASE_  :      str							=      {0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}



def 						UpperCAmelCase__ (					A__						,     A__						,     A__ )   ->   list:




   """simple docstring"""
   lowerCamelCase__						       =      True
   lowerCamelCase__						       =      []

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

   return [vert, *connected_verts]



def 						UpperCAmelCase__ (					A__ )   ->   list:




   """simple docstring"""
   lowerCamelCase__						       =      len(A__ )
   lowerCamelCase__						       =      graph_size * [False]
   lowerCamelCase__						       =      []

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

   return components_list


if __name__ == "__main__":
     import doctest

     doctest.testmod()




