





def   __snake_case    (       _lowerCAmelCase			:			Tuple					,					_lowerCAmelCase			:			Tuple						)			->    str:
   A_       :					Union[str, Any]        =      [1]
   for i in range(2					,					_lowerCAmelCase						):
      factorials.append(factorials[-1] * i						)
   assert 0 <= k < factorials[-1] * n, "k out of bounds"

   A_       :					Any        =      []
   A_       :					Dict        =      list(range(_lowerCAmelCase						)						)

   # Find permutation
   while factorials:
      A_       :					List[Any]        =      factorials.pop()
      A_   ,    A_       :					Union[str, Any]        =      divmod(_lowerCAmelCase					,					_lowerCAmelCase						)
      permutation.append(elements[number]						)
      elements.remove(elements[number]						)
   permutation.append(elements[0]						)

   return permutation


if __name__ == "__main__":
 import doctest

 doctest.testmod()







from math import sqrt

def   __snake_case    (       _lowerCAmelCase			:			int						)			->    bool:

   if 1 < number < 4:
      # 2 and 3 are primes
      return True
   elif number < 2 or number % 2 == 0 or number % 3 == 0:
      # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
      return False

   # All primes number are in format of 6k +/- 1
   for i in range(5					,					int(sqrt(_lowerCAmelCase						) + 1						)					,					6						):
      if number % i == 0 or number % (i + 2) == 0:
         return False
   return True

def   __snake_case    (       _lowerCAmelCase			:			int = 10001						)			->    int:
   A_       :					Any        =      0
   A_       :					Tuple        =      1
   while count != nth and number < 3:
      number += 1
      if is_prime(_lowerCAmelCase						):
         count += 1
   while count != nth:
      number += 2
      if is_prime(_lowerCAmelCase						):
         count += 1
   return number


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