



from __future__ import annotations

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

UpperCAmelCase_		 =					TypeVar("""T""")


class 	lowerCamelCase__	(       Generic[T]):



 """simple docstring"""

 a__					: Any =  42  # Cache store of keys
 a__					: Any =  42  # References of the keys in cache
 a__					: Union[str, Any] =  10  # Maximum capacity of cache

 def __init__(    self					:					Dict			,						__lowerCAmelCase					:					Optional[int]      )   ->	str:
    _A      =       deque()
    _A      =       set()
    if not n:
       _A      =       sys.maxsize
    elif n < 0:
       raise ValueError('''n should be an integer greater than 0.'''      )
    else:
       _A      =       n

 def     snake_case_      (    self					:					int			,						__lowerCAmelCase					:					List[Any]      )   ->	int:
    if x not in self.key_reference:
       if len(self.dq_store      ) == LRUCache._MAX_CAPACITY:
          _A      =       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     snake_case_      (    self					:					Any      )   ->	Optional[int]:
    for k in self.dq_store:
       print(lowerCamelCase__      )

 def __repr__(    self					:					Optional[int]      )   ->	List[Any]:
    return f'''LRUCache({self._MAX_CAPACITY}) => {list(self.dq_store      )}'''


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   UpperCAmelCase_		 =					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	(      SCREAMING_SNAKE_CASE      ):
	stooge(SCREAMING_SNAKE_CASE	,0	,len(SCREAMING_SNAKE_CASE      ) - 1      )
	return arr



def 			_A	(      SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE      ):
	if i >= h:
		return

	# If first element is smaller than the last then swap them
	if arr[i] > arr[h]:
		UpperCAmelCase__							,						UpperCAmelCase__:	int									= arr[h], arr[i]

	# If there are more than 2 elements in the array
	if h - i + 1 > 2:
		UpperCAmelCase__:	str									= (int)((h - i + 1) / 3      )

		# Recursively sort first 2/3 elements
		stooge(SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,(h - t)      )

		# Recursively sort last 2/3 elements
		stooge(SCREAMING_SNAKE_CASE	,i + t	,(SCREAMING_SNAKE_CASE)      )

		# Recursively sort first 2/3 elements
		stooge(SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,(h - t)      )


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