



"""simple docstring"""
from math import sqrt


def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase							) ->						bool:







  '''simple docstring'''


  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 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase = 1_00_01							) ->						int:







  '''simple docstring'''


  lowercase_								= 0
  lowercase_								= 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() = }")






"""simple docstring"""
def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase							) ->						list[list[int]]:







  '''simple docstring'''


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


def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase							) ->						Tuple:







  '''simple docstring'''


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

  lowercase_								= []
  backtrack(0							)
  return output


if __name__ == "__main__":
       import doctest

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

