





"""simple docstring"""





def 					a__    (    _SCREAMING_SNAKE_CASE     ,		_SCREAMING_SNAKE_CASE			):




		"""simple docstring"""


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

		UpperCamelCase      =		[]
		UpperCamelCase      =		list(range(_UpperCAmelCase			)			)

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

		return permutation


if __name__ == "__main__":
						import doctest

						doctest.testmod()











import copy
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, Optional, Union

@dataclass
class     _A       :
       UpperCamelCase__  :    Optional[Union[str, Path]]											=						None
       UpperCamelCase__  :    bool											=						False
       UpperCamelCase__  :    bool											=						False
       UpperCamelCase__  :    bool											=						False
       UpperCamelCase__  :    Optional[Dict]											=						None
       UpperCamelCase__  :    Optional[str]											=						None
       UpperCamelCase__  :    bool											=						False
       UpperCamelCase__  :    bool											=						False
       UpperCamelCase__  :    bool											=						False
       UpperCamelCase__  :    bool											=						True
       UpperCamelCase__  :    Optional[int]											=						None
       UpperCamelCase__  :    int											=						1
       UpperCamelCase__  :    Optional[Union[str, bool]]											=						None
       UpperCamelCase__  :    bool											=						False
       UpperCamelCase__  :    Optional[Dict]											=						None
       UpperCamelCase__  :    Optional[str]											=						None



       def 		_lowerCamelCase			(		self							:     Union[str, Any]):


           '''simple docstring'''

           return self.__class__(**{k: copy.deepcopy(__SCREAMING_SNAKE_CASE) for k, v in self.__dict__.items()})





