

from __future__ import annotations

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

A_	:			Tuple  	=      TypeVar('T')



class    _a						(Generic[T]    ):


					'''simple docstring'''






					UpperCAmelCase__:       deque[T]  # Cache store of keys
					UpperCAmelCase__:       set[T]  # References of the keys in cache
					UpperCAmelCase__:       int  							=	10  # Maximum capacity of cache






					def __init__(			self   ,	A__      ):
						A__							:   Any					       =		deque()
						A__							:   List[str]					       =		set()
						if not n:
							A__							:   int					       =		sys.maxsize
						elif n < 0:
							raise ValueError("""n should be an integer greater than 0."""      )
						else:
							A__							:   List[str]					       =		n






					def   __A      (			self   ,	A__      ):
						if x not in self.key_reference:
							if len(self.dq_store      ) == LRUCache._MAX_CAPACITY:
								A__							:   Union[str, Any]					       =		self.dq_store.pop()
								self.key_reference.remove(__lowercase      )
						else:
							self.dq_store.remove(__lowercase      )

						self.dq_store.appendleft(__lowercase      )
						self.key_reference.add(__lowercase      )






					def   __A      (			self      ):
						for k in self.dq_store:
							print(__lowercase      )






					def __repr__(			self      ):
						return F"""LRUCache({self._MAX_CAPACITY}) => {list(self.dq_store      )}"""


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	A_	:			Any  	=      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]"






from typing import Any

def 						UpperCamelCase (lowercase_:			list )					->				list[Any]:
	if not input_list:
		return []
	A__							:   Any					       =		[input_list.count(lowercase_ ) for value in input_list]
	A__							:   List[Any]					       =		max(lowercase_ )  # Gets the maximum count in the input list.
	# Gets values of modes
	return sorted({input_list[i] for i, value in enumerate(lowercase_ ) if value == y} )


if __name__ == "__main__":
	import doctest

	doctest.testmod()



