



"""simple docstring"""




import itertools
import math

def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						int    )  ->       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(math.sqrt(snake_case_    ) + 1    )						,  6    ):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True

def 						__snake_case						(				)  ->       str:





     '''simple docstring'''

     _UpperCAmelCase      :     Optional[Any]        =   2
     while True:
          if is_prime(snake_case_    ):
               yield num
          num += 1

def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						int = 10_001    )  ->       int:





     '''simple docstring'''

     return next(itertools.islice(prime_generator()						,  nth - 1						,  snake_case_    )    )


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





"""simple docstring"""




def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						list    )  ->       list:





     '''simple docstring'''

     if len(SCREAMING_SNAKE_CASE__    ) < 2:
          return collection

     def circle_sort_util(SCREAMING_SNAKE_CASE__     :						list						,  SCREAMING_SNAKE_CASE__     :						int						,  SCREAMING_SNAKE_CASE__     :						int    ) -> bool:
          _UpperCAmelCase      :     Dict        =   False

          if low == high:
               return swapped

          _UpperCAmelCase      :     str        =   low
          _UpperCAmelCase      :     Dict        =   high

          while left < right:
               if collection[left] > collection[right]:
                    _UpperCAmelCase    ,	_UpperCAmelCase      :     List[str]        =   (
                        collection[right],
                        collection[left],
                    )
                    _UpperCAmelCase      :     Optional[int]        =   True

               left += 1
               right -= 1

          if left == right and collection[left] > collection[right + 1]:
               _UpperCAmelCase    ,	_UpperCAmelCase      :     int        =   (
                   collection[right + 1],
                   collection[left],
               )

               _UpperCAmelCase      :     Union[str, Any]        =   True

          _UpperCAmelCase      :     Dict        =   low + int((high - low) / 2    )
          _UpperCAmelCase      :     Any        =   circle_sort_util(SCREAMING_SNAKE_CASE__						,  SCREAMING_SNAKE_CASE__						,  SCREAMING_SNAKE_CASE__    )
          _UpperCAmelCase      :     Optional[Any]        =   circle_sort_util(SCREAMING_SNAKE_CASE__						,  mid + 1						,  SCREAMING_SNAKE_CASE__    )

          return swapped or left_swap or right_swap

     _UpperCAmelCase      :     Tuple        =   True

     while is_not_sorted is True:
          _UpperCAmelCase      :     Dict        =   circle_sort_util(SCREAMING_SNAKE_CASE__						,  0						,  len(SCREAMING_SNAKE_CASE__    ) - 1    )

     return collection


if __name__ == "__main__":
 _lowerCAmelCase    : Dict							=							input("Enter numbers separated by a comma:\n").strip()
 _lowerCAmelCase    : Optional[Any]							=							[int(item) for item in user_input.split(",")]
 print(circle_sort(unsorted))
