





def      _A       (		SCREAMING_SNAKE_CASE     :   str       ,       SCREAMING_SNAKE_CASE     :   List[Any]						):





  """simple docstring"""



  a__	:					Optional[int]										=[1]
  for i in range(2       ,       SCREAMING_SNAKE_CASE						):
    factorials.append(factorials[-1] * i						)
  assert 0 <= k < factorials[-1] * n, "k out of bounds"

  a__	:					int										=[]
  a__	:					Optional[Any]										=list(range(SCREAMING_SNAKE_CASE						)						)

  # Find permutation
  while factorials:
    a__	:					int										=factorials.pop()
    a__					,							a__	:					int										=divmod(SCREAMING_SNAKE_CASE       ,       SCREAMING_SNAKE_CASE						)
    permutation.append(elements[number]						)
    elements.remove(elements[number]						)
  permutation.append(elements[0]						)

  return permutation


if __name__ == "__main__":
     import doctest

     doctest.testmod()














"""simple docstring"""



def 						lowercase    (				__snake_case				: int = 1_0_0	):
		lowercase_ : str							       =   0
		lowercase_ : List[Any]							       =   0
		for i in range(1		,					n + 1	):
				sum_of_squares += i**2
				sum_of_ints += i
		return sum_of_ints**2 - sum_of_squares


if __name__ == "__main__":
						print(F"""{solution() = }""")



