






"""simple docstring"""





import math



def   a    (     __UpperCAmelCase      :    int  )    ->							str:
						__magic_name__:	str							=       0
						__magic_name__:	Tuple							=       0
						while num > 0:
												__magic_name__:	List[Any]							=       num % 8
												__magic_name__:	int							=       octal + (remainder * math.floor(math.pow(1_0      ,   __UpperCAmelCase  )  ))
												counter += 1
												__magic_name__:	Tuple							=       math.floor(num / 8  )  # basically /= 8 without remainder if any
												# This formatting removes trailing '.0' from `octal`.
						return f'0o{int(__UpperCAmelCase  )}'



def   a    (     )    ->							None:
						print("""\n2 in octal is:"""  )
						print(decimal_to_octal(2  )  )  # = 2
						print("""\n8 in octal is:"""  )
						print(decimal_to_octal(8  )  )  # = 10
						print("""\n65 in octal is:"""  )
						print(decimal_to_octal(6_5  )  )  # = 101
						print("""\n216 in octal is:"""  )
						print(decimal_to_octal(2_1_6  )  )  # = 330
						print("""\n512 in octal is:"""  )
						print(decimal_to_octal(5_1_2  )  )  # = 1000
						print("""\n"""  )


if __name__ == "__main__":
							main()











"""simple docstring"""





def   a    (     __UpperCAmelCase      :    List[Any]  )    ->							str:
						__magic_name__:	Optional[int]							=       [0] * len(__UpperCAmelCase  )
						__magic_name__:	str							=       []
						__magic_name__:	Any							=       []
						__magic_name__:	Union[str, Any]							=       0

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

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

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

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


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

topological_sort(graph)



