



'''simple docstring'''



def   _A       (   _lowerCAmelCase  ,   _lowerCAmelCase					):



       """simple docstring"""



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

       __lowercase       	=[]
       __lowercase       	=list(range(_lowerCAmelCase					)					)

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

       return permutation


if __name__ == "__main__":
  import doctest

  doctest.testmod()








'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import _LazyModule


lowerCamelCase	 =       {"""tokenization_bertweet""": ["""BertweetTokenizer"""]}


if TYPE_CHECKING:
		from .tokenization_bertweet import BertweetTokenizer

else:
		import sys

		lowerCamelCase	 =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



