


'''simple docstring'''


def  __lowerCAmelCase (__lowerCAmelCase   ):
		_UpperCAmelCase		:       Tuple								=      [0] * len(__lowerCAmelCase   )
		_UpperCAmelCase		:       Dict								=      []
		_UpperCAmelCase		:       Optional[Any]								=      []
		_UpperCAmelCase		:       Any								=      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		:       List[Any]								=      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'''


from typing import Optional
from urllib.parse import quote

import huggingface_hub as hfh
from packaging import version






def  __lowerCAmelCase (__lowerCAmelCase      , __lowerCAmelCase      , __lowerCAmelCase = None   ):
		if version.parse(hfh.__version__   ).release < version.parse("0.11.0"   ).release:
				# old versions of hfh don't url-encode the file path
				_UpperCAmelCase		:       str								=      quote(__lowerCAmelCase   )
		return hfh.hf_hub_url(__lowerCAmelCase      , __lowerCAmelCase      , repo_type="dataset"      , revision=__lowerCAmelCase   )



