



'''simple docstring'''





def lowerCAmelCase  (__A):



     """simple docstring"""



     _a      =  []
     if len(__A) == 1:
          return [nums.copy()]
     for _ in range(len(__A)):
          _a      =  nums.pop(0)
          _a      =  permute(__A)
          for perm in permutations:
               perm.append(__A)
          result.extend(__A)
          nums.append(__A)
     return result




def lowerCAmelCase  (__A):



     """simple docstring"""



     def backtrack(__A):
          if start == len(__A) - 1:
               output.append(nums[:])
          else:
               for i in range(__A  ,	len(__A)):
                    _a  ,    _a      =  nums[i], nums[start]
                    backtrack(start + 1)
                    _a  ,    _a      =  nums[i], nums[start]  # backtrack

     _a      =  []
     backtrack(0)
     return output


if __name__ == "__main__":
  import doctest

  # use res to print the data in permute2 function
  lowercase_		       =  permutea([1, 2, 3])
  print(res)
  doctest.testmod()








'''simple docstring'''





from __future__ import annotations

import math




def lowerCAmelCase  (__A  ,	__A):



     """simple docstring"""



     _a      =  u
     for i in range(1  ,	__A):
          _a      =  temp * (u - i)
     return temp




def lowerCAmelCase  ():



     """simple docstring"""



     _a      =  int(input('''enter the numbers of values: '''))
     _a      =  []
     for _ in range(__A):
          y.append([])
     for i in range(__A):
          for j in range(__A):
               y[i].append(__A)
               _a      =  0

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

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

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

     # for calculating forward difference table

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

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

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


if __name__ == "__main__":
  main()



