

from __future__ import annotations

import sys
from collections import deque
from typing import Generic, TypeVar

lowercase_     :   int 				=				TypeVar('T')






class 		_lowerCamelCase		(   Generic[T]    ):
    __a  =      42  # Cache store of keys
    __a  =      42  # References of the keys in cache
    __a  =      10  # Maximum capacity of cache
    def __init__(  self , lowerCAmelCase   )       ->					None:
     SCREAMING_SNAKE_CASE__:   Dict=      deque()
     SCREAMING_SNAKE_CASE__:   Optional[int]=      set()
     if not n:
      SCREAMING_SNAKE_CASE__:   Union[str, Any]=      sys.maxsize
     elif n < 0:
      raise ValueError('''n should be an integer greater than 0.'''   )
     else:
      SCREAMING_SNAKE_CASE__:   List[Any]=      n
    def 						UpperCamelCase_				(  self , lowerCAmelCase   )       ->					None:

     if x not in self.key_reference:
      if len(self.dq_store   ) == LRUCache._MAX_CAPACITY:
       SCREAMING_SNAKE_CASE__:   Dict=      self.dq_store.pop()
       self.key_reference.remove(lowerCAmelCase   )
     else:
      self.dq_store.remove(lowerCAmelCase   )

     self.dq_store.appendleft(lowerCAmelCase   )
     self.key_reference.add(lowerCAmelCase   )
    def 						UpperCamelCase_				(  self   )       ->					None:

     for k in self.dq_store:
      print(lowerCAmelCase   )



    def __repr__(  self   )       ->					str:
     return f'LRUCache({self._MAX_CAPACITY}) => {list(self.dq_store   )}'


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      lowercase_     :   List[str] 				=				LRUCache(4)
      lru_cache.refer('A')
      lru_cache.refer(2)
      lru_cache.refer(3)
      lru_cache.refer('A')
      lru_cache.refer(4)
      lru_cache.refer(5)
      lru_cache.display()

      print(lru_cache)
      assert str(lru_cache) == "LRUCache(4) => [5, 4, 'A', 3]"


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))

