






def      __A					(     _lowercase					,			_lowercase					,			_lowercase ):

     '''simple docstring'''







     return not any(
         neighbour == 1 and colored_vertices[i] == color
         for i, neighbour in enumerate(_lowercase ) )




def      __A					(     _lowercase					,			_lowercase					,			_lowercase					,			_lowercase ):

     '''simple docstring'''







     if index == len(_lowercase ):
          return True

     # Recursive Step
     for i in range(_lowercase ):
          if valid_coloring(graph[index]					,			_lowercase					,			_lowercase ):
               # Color current vertex
               _A								= i
               # Validate coloring
               if util_color(_lowercase					,			_lowercase					,			_lowercase					,			index + 1 ):
                    return True
               # Backtrack
               _A								= -1
     return False




def      __A					(     _lowercase					,			_lowercase ):

     '''simple docstring'''







     _A								= [-1] * len(_lowercase )

     if util_color(_lowercase					,			_lowercase					,			_lowercase					,			0 ):
          return colored_vertices

     return []











def      __A					(     _lowercase ):

					'''simple docstring'''







					_A								= [0] * len(_lowercase )
					_A								= []
					_A								= []
					_A								= 0

					for values in graph.values():
										for i in values:
															indegree[i] += 1

					for i in range(len(_lowercase ) ):
										if indegree[i] == 0:
															queue.append(_lowercase )

					while queue:
										_A								= queue.pop(0 )
										cnt += 1
										topo.append(_lowercase )
										for x in graph[vertex]:
															indegree[x] -= 1
															if indegree[x] == 0:
																				queue.append(_lowercase )

					if cnt != len(_lowercase ):
										print('''Cycle exists''' )
					else:
										print(_lowercase )


# Adjacency List of Graph
__A      =				{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}


topological_sort(graph)



