


def       _a			(				SCREAMING_SNAKE_CASE					):


		"""simple docstring"""




		lowercase__						=				[0] * len(SCREAMING_SNAKE_CASE					)
		lowercase__						=				[]
		lowercase__						=				[]
		lowercase__						=				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:
				lowercase__						=				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
lowerCAmelCase	=							{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}
topological_sort(graph)






def       _a			(				SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE					):


		"""simple docstring"""




		lowercase__						=				len(SCREAMING_SNAKE_CASE					)
		lowercase__						=				[]
		for i in range(len(SCREAMING_SNAKE_CASE					) - pat_len + 1					):
				lowercase__						=				True
				for j in range(SCREAMING_SNAKE_CASE					):
						if s[i + j] != pattern[j]:
								lowercase__						=				False
								break
				if match_found:
						position.append(SCREAMING_SNAKE_CASE					)
		return position


if __name__ == "__main__":
			assert naive_pattern_search('ABCDEFG', 'DE') == [3]
			print(naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC'))


