


"""simple docstring"""





from __future__ import annotations

import math





def      lowercase__						(	lowerCamelCase  :	Union[str, Any]					,						lowerCamelCase  :	List[str]					)       ->  List[Any]:
  lowerCAmelCase__     :     Any										=       u
  for i in range(1					,						lowerCAmelCase__					):
    lowerCAmelCase__     :     Any										=       temp * (u - i)
  return temp





def      lowercase__						(	)       ->  Optional[Any]:
  lowerCAmelCase__     :     List[Any]										=       int(input("enter the numbers of values: "					)					)
  lowerCAmelCase__     :     Optional[Any]										=       []
  for _ in range(lowerCAmelCase__					):
    y.append([]					)
  for i in range(lowerCAmelCase__					):
    for j in range(lowerCAmelCase__					):
      y[i].append(lowerCAmelCase__					)
      lowerCAmelCase__     :     Union[str, Any]										=       0

  print("enter the values of parameters in a list: "					)
  lowerCAmelCase__     :     List[str]										=       list(map(lowerCAmelCase__					,						input().split()					)					)

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

  lowerCAmelCase__     :     str										=       int(input("enter the value to interpolate: "					)					)
  lowerCAmelCase__     :     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					):
      lowerCAmelCase__     :     Tuple										=       y[j + 1][i - 1] - y[j][i - 1]

  lowerCAmelCase__     :     List[str]										=       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()


"""simple docstring"""


def  lowercase						(	lowerCAmelCase__						):
			return " ".join(input_str.split()[::-1]						)


if __name__ == "__main__":
						import doctest

						doctest.testmod()



