


def 						_UpperCAmelCase    (      SCREAMING_SNAKE_CASE__      : Tuple    ):
     __UpperCamelCase   							=[0] * len(SCREAMING_SNAKE_CASE__    )
     __UpperCamelCase   							=[]
     __UpperCamelCase   							=[]
     __UpperCamelCase   							=0

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

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

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

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


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





topological_sort(graph)









from ..utils import DummyObject, requires_backends






class    UpperCAmelCase__	( metaclass=A_		):



    """simple docstring"""






    UpperCAmelCase__						:		Any              =  ["speech"]






    def __init__(      self ,       *A_ ,       **A_   )  ->	Any:
         requires_backends(self ,       ['speech']   )






class    UpperCAmelCase__	( metaclass=A_		):



    """simple docstring"""






    UpperCAmelCase__						:		Union[str, Any]              =  ["speech"]






    def __init__(      self ,       *A_ ,       **A_   )  ->	Union[str, Any]:
         requires_backends(self ,       ['speech']   )





