


"""simple docstring"""





def        a__     (				lowerCAmelCase__				):
      UpperCAmelCase_      			=							[0] * len(lowerCAmelCase__				)
      UpperCAmelCase_      			=							[]
      UpperCAmelCase_      			=							[]
      UpperCAmelCase_      			=							0

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

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

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

      if cnt != len(lowerCAmelCase__				):
            print("Cycle exists"				)
      else:
            print(lowerCAmelCase__				)


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


topological_sort(graph)









"""simple docstring"""





def        a__     (				lowerCAmelCase__     ,      lowerCAmelCase__				):
      return [sentence[i : i + ngram_size] for i in range(len(lowerCAmelCase__				) - ngram_size + 1				)]


if __name__ == "__main__":
  from doctest import testmod

  testmod()




