

from __future__ import annotations

lowercase_             =     1_0
def   a   (    A__			:     list[int]  )					->   list[int]:





      """simple docstring"""



      _lowercase			 =1
      _lowercase			 =max(A__  )
      while placement <= max_digit:
            # declare and initialize empty buckets
            _lowercase			 =[[] for _ in range(A__  )]
            # split list_of_ints between the buckets
            for i in list_of_ints:
                  _lowercase			 =int((i / placement) % RADIX  )
                  buckets[tmp].append(A__  )
            # put each buckets' contents into list_of_ints
            _lowercase			 =0
            for b in range(A__  ):
                  for i in buckets[b]:
                        _lowercase			 =i
                        a += 1
        # move to next
            placement *= RADIX
      return list_of_ints


if __name__ == "__main__":
  import doctest

  doctest.testmod()





def   a   (    A__			:     Optional[int]  )					->   Tuple:





      """simple docstring"""



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

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

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

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

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


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







topological_sort(graph)


