

'''simple docstring'''





from __future__ import annotations

import math







def   _UpperCamelCase	(		__UpperCamelCase    ,__UpperCamelCase	)       ->			float:
					lowerCamelCase_  				=      u
					for i in range(1    ,__UpperCamelCase	):
										lowerCamelCase_  				=      temp * (u - i)
					return temp







def   _UpperCamelCase	(		)       ->			None:
					lowerCamelCase_  				=      int(input('enter the numbers of values: '	)	)
					lowerCamelCase_  				=      []
					for _ in range(__UpperCamelCase	):
										y.append([]	)
					for i in range(__UpperCamelCase	):
										for j in range(__UpperCamelCase	):
															y[i].append(__UpperCamelCase	)
															lowerCamelCase_  				=      0

					print('enter the values of parameters in a list: '	)
					lowerCamelCase_  				=      list(map(__UpperCamelCase    ,input().split()	)	)

					print('enter the values of corresponding parameters: '	)
					for i in range(__UpperCamelCase	):
										lowerCamelCase_  				=      float(input()	)

					lowerCamelCase_  				=      int(input('enter the value to interpolate: '	)	)
					lowerCamelCase_  				=      (value - x[0]) / (x[1] - x[0])

					# for calculating forward difference table

					for i in range(1    ,__UpperCamelCase	):
										for j in range(n - i	):
															lowerCamelCase_  				=      y[j + 1][i - 1] - y[j][i - 1]

					lowerCamelCase_  				=      y[0][0]
					for i in range(1    ,__UpperCamelCase	):
										summ += (ucal(__UpperCamelCase    ,__UpperCamelCase	) * y[0][i]) / math.factorial(__UpperCamelCase	)

					print(f'''the value at {value} is {summ}'''	)


if __name__ == "__main__":
				main()









'''simple docstring'''


def 						lowerCamelCase__   (				a							):
						__snake_case						 =   [0] * len(a							)
						__snake_case						 =   []
						__snake_case						 =   []
						__snake_case						 =   0

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

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

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

						if cnt != len(a							):
												print('Cycle exists'							)
						else:
												print(a							)


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






topological_sort(graph)

