
"""simple docstring"""







from collections.abc import Iterable
from typing import Generic, TypeVar

lowerCamelCase__   					=		TypeVar("""_T""")




class  A__       (	Generic[_T]):

		def __init__(      self       ,		_SCREAMING_SNAKE_CASE = None ):
			__lowerCAmelCase			:						list[_T]									=      list(iterable or [] )
			__lowerCAmelCase			:						list[_T]									=      []

		def __len__(      self ):
			return len(self._stacka ) + len(self._stacka )

		def __repr__(      self ):
			return f"Queue({tuple(self._stacka[::-1] + self._stacka )})"

		def 							__lowerCamelCase							(      self       ,		_SCREAMING_SNAKE_CASE ):
			self._stacka.append(_SCREAMING_SNAKE_CASE )







		def 							__lowerCamelCase							(      self ):
			__lowerCAmelCase			:						Union[str, Any]									=      self._stacka.pop
			__lowerCAmelCase			:						List[Any]									=      self._stacka.append

			if not self._stacka:
				while self._stacka:
					stacka_append(stacka_pop() )

			if not self._stacka:
				raise IndexError('Queue is empty' )
			return self._stacka.pop()


if __name__ == "__main__":
							from doctest import testmod

							testmod()

"""simple docstring"""





from __future__ import annotations

import math







def 	__a     (		__lowerCamelCase,		__lowerCamelCase  ):
   UpperCAmelCase_					:					Any			     =    u
   for i in range(1,		__lowerCamelCase  ):
      UpperCAmelCase_					:					int			     =    temp * (u - i)
   return temp







def 	__a     (		):
   UpperCAmelCase_					:					str			     =    int(input("enter the numbers of values: "  )  )
   UpperCAmelCase_					:					list[list[float]]			     =    []
   for _ in range(__lowerCamelCase  ):
      y.append([]  )
   for i in range(__lowerCamelCase  ):
      for j in range(__lowerCamelCase  ):
         y[i].append(__lowerCamelCase  )
         UpperCAmelCase_					:					Tuple			     =    0

   print("enter the values of parameters in a list: "  )
   UpperCAmelCase_					:					Union[str, Any]			     =    list(map(__lowerCamelCase,		input().split()  )  )

   print("enter the values of corresponding parameters: "  )
   for i in range(__lowerCamelCase  ):
      UpperCAmelCase_					:					int			     =    float(input()  )

   UpperCAmelCase_					:					Tuple			     =    int(input("enter the value to interpolate: "  )  )
   UpperCAmelCase_					:					Tuple			     =    (value - x[0]) / (x[1] - x[0])

   # for calculating forward difference table

   for i in range(1,		__lowerCamelCase  ):
      for j in range(n - i  ):
         UpperCAmelCase_					:					Union[str, Any]			     =    y[j + 1][i - 1] - y[j][i - 1]

   UpperCAmelCase_					:					Optional[int]			     =    y[0][0]
   for i in range(1,		__lowerCamelCase  ):
      summ += (ucal(__lowerCamelCase,		__lowerCamelCase  ) * y[0][i]) / math.factorial(__lowerCamelCase  )

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


if __name__ == "__main__":
    main()


