



def      _A				(UpperCamelCase		:      str )  ->Union[str, Any]:



			'''simple docstring'''







			lowerCamelCase__ :      List[Any]								=		[0] * len(UpperCamelCase )
			lowerCamelCase__ :      str								=		[]
			lowerCamelCase__ :      Optional[Any]								=		[]
			lowerCamelCase__ :      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:
						lowerCamelCase__ :      List[str]								=		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
_lowercase     							=						{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}
topological_sort(graph)








from math import factorial, pi






def      _A				(UpperCamelCase		:      float      ,			UpperCamelCase		:      int = 30 )  ->float:



			'''simple docstring'''







			if not isinstance(UpperCamelCase      ,			(int, float) ):
						raise ValueError("""maclaurin_sin() requires either an int or float for theta""" )

			if not isinstance(UpperCamelCase      ,			UpperCamelCase ) or accuracy <= 0:
						raise ValueError("""maclaurin_sin() requires a positive int for accuracy""" )

			lowerCamelCase__ :      Dict								=		float(UpperCamelCase )
			lowerCamelCase__ :      int								=		theta // (2 * pi)
			theta -= 2 * div * pi
			return sum(
			    (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1 ) for r in range(UpperCamelCase ) )






def      _A				(UpperCamelCase		:      float      ,			UpperCamelCase		:      int = 30 )  ->float:



			'''simple docstring'''







			if not isinstance(UpperCamelCase      ,			(int, float) ):
						raise ValueError("""maclaurin_cos() requires either an int or float for theta""" )

			if not isinstance(UpperCamelCase      ,			UpperCamelCase ) or accuracy <= 0:
						raise ValueError("""maclaurin_cos() requires a positive int for accuracy""" )

			lowerCamelCase__ :      int								=		float(UpperCamelCase )
			lowerCamelCase__ :      Optional[int]								=		theta // (2 * pi)
			theta -= 2 * div * pi
			return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r ) for r in range(UpperCamelCase ) )


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				print(maclaurin_sin(10))
				print(maclaurin_sin(-10))
				print(maclaurin_sin(10, 15))
				print(maclaurin_sin(-10, 15))

				print(maclaurin_cos(5))
				print(maclaurin_cos(-5))
				print(maclaurin_cos(10, 15))
				print(maclaurin_cos(-10, 15))



