class 		_lowerCamelCase		:
    def __init__(  self , lowerCAmelCase   )       ->					None:
     SCREAMING_SNAKE_CASE__:   List[Any]=      size
     SCREAMING_SNAKE_CASE__:   Tuple=      [0] * size
     SCREAMING_SNAKE_CASE__:   Any=      [0] * size
    @staticmethod
    def 						UpperCamelCase_				(  lowerCAmelCase   )       ->					int:
     return index | (index + 1)
    @staticmethod
    def 						UpperCamelCase_				(  lowerCAmelCase   )       ->					int:
     return (index & (index + 1)) - 1
    def 						UpperCamelCase_				(  self , lowerCAmelCase , lowerCAmelCase   )       ->					None:
     SCREAMING_SNAKE_CASE__:   int=      value
     while index < self.size:
      SCREAMING_SNAKE_CASE__:   Union[str, Any]=      self.get_prev(lowerCAmelCase   ) + 1
      if current_left_border == index:
       SCREAMING_SNAKE_CASE__:   Any=      value
      else:
       SCREAMING_SNAKE_CASE__:   List[Any]=      max(lowerCAmelCase , lowerCAmelCase , lowerCAmelCase   )
      SCREAMING_SNAKE_CASE__:   List[Any]=      self.get_next(lowerCAmelCase   )



    def 						UpperCamelCase_				(  self , lowerCAmelCase , lowerCAmelCase   )       ->					int:
     right -= 1  # Because of right is exclusive
     SCREAMING_SNAKE_CASE__:   Union[str, Any]=      0
     while left <= right:
      SCREAMING_SNAKE_CASE__:   Union[str, Any]=      self.get_prev(lowerCAmelCase   )
      if left <= current_left:
       SCREAMING_SNAKE_CASE__:   str=      max(lowerCAmelCase , self.tree[right]   )
       SCREAMING_SNAKE_CASE__:   str=      current_left
      else:
       SCREAMING_SNAKE_CASE__:   List[Any]=      max(lowerCAmelCase , self.arr[right]   )
       right -= 1
     return result


if __name__ == "__main__":
      import doctest

      doctest.testmod()


def 			A__      (	snake_case_ :		list      ):

 if len(snake_case_      ) < 2:
  return collection

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

  if low == high:
   return swapped

  SCREAMING_SNAKE_CASE__:   str=      low
  SCREAMING_SNAKE_CASE__:   Optional[int]=      high

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

   left += 1
   right -= 1

  if left == right and collection[left] > collection[right + 1]:
   SCREAMING_SNAKE_CASE__,	SCREAMING_SNAKE_CASE__:   List[str]=      (
       collection[right + 1],
       collection[left],
   )

   SCREAMING_SNAKE_CASE__:   List[str]=      True

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

  return swapped or left_swap or right_swap

 SCREAMING_SNAKE_CASE__:   Optional[int]=      True

 while is_not_sorted is True:
  SCREAMING_SNAKE_CASE__:   Tuple=      circle_sort_util(snake_case_       ,				0       ,				len(snake_case_      ) - 1      )

 return collection


if __name__ == "__main__":
      lowercase_     :   Tuple 				=				input('Enter numbers separated by a comma:\n').strip()
      lowercase_     :   str 				=				[int(item) for item in user_input.split(',')]
      print(circle_sort(unsorted))

