
from __future__ import annotations

from typing import Generic, TypeVar

lowercase_											=	TypeVar("""T""")





class   __UpperCamelCase				(    lowerCAmelCase__   ):






     """simple docstring"""







     pass






class   __UpperCamelCase				(    lowerCAmelCase__   ):






     """simple docstring"""







     pass






class   __UpperCamelCase				(    Generic[T]   ):






     """simple docstring"""







     def __init__(							self    :    Union[str, Any]      ,		_A    :    int = 10				):







       """simple docstring"""




       __SCREAMING_SNAKE_CASE     :					list[T]			=						[]
       __SCREAMING_SNAKE_CASE     :					int			=						limit



     def __bool__(							self    :    List[str]				):







       """simple docstring"""




       return bool(self.stack				)



     def __str__(							self    :    Tuple				):







       """simple docstring"""




       return str(self.stack				)



     def 				UpperCAmelCase__    (							self    :    Any      ,		_A    :    T				):







       """simple docstring"""




       if len(self.stack				) >= self.limit:
         raise StackOverflowError
       self.stack.append(_A				)



     def 				UpperCAmelCase__    (							self    :    List[Any]				):







       """simple docstring"""




       if not self.stack:
         raise StackUnderflowError
       return self.stack.pop()



     def 				UpperCAmelCase__    (							self    :    Tuple				):







       """simple docstring"""




       if not self.stack:
         raise StackUnderflowError
       return self.stack[-1]



     def 				UpperCAmelCase__    (							self    :    Tuple				):







       """simple docstring"""




       return not bool(self.stack				)



     def 				UpperCAmelCase__    (							self    :    Any				):







       """simple docstring"""




       return self.size() == self.limit



     def 				UpperCAmelCase__    (							self    :    Union[str, Any]				):







       """simple docstring"""




       return len(self.stack				)




     def __contains__(							self    :    Optional[Any]      ,		_A    :    T				):







       """simple docstring"""




       return item in self.stack






def     a__			(    ):





  """simple docstring"""
  __SCREAMING_SNAKE_CASE     :					Stack[int]			=						Stack(10    )
  assert bool(snake_case    ) is False
  assert stack.is_empty() is True
  assert stack.is_full() is False
  assert str(snake_case    ) == "[]"

  try:
    __SCREAMING_SNAKE_CASE     :					List[Any]			=						stack.pop()
    raise AssertionError  # This should not happen
  except StackUnderflowError:
    assert True  # This should happen

  try:
    __SCREAMING_SNAKE_CASE     :					Optional[Any]			=						stack.peek()
    raise AssertionError  # This should not happen
  except StackUnderflowError:
    assert True  # This should happen

  for i in range(10    ):
    assert stack.size() == i
    stack.push(snake_case    )

  assert bool(snake_case    )
  assert not stack.is_empty()
  assert stack.is_full()
  assert str(snake_case    ) == str(list(range(10    )    )    )
  assert stack.pop() == 9
  assert stack.peek() == 8

  stack.push(100    )
  assert str(snake_case    ) == str([0, 1, 2, 3, 4, 5, 6, 7, 8, 100]    )

  try:
    stack.push(200    )
    raise AssertionError  # This should not happen
  except StackOverflowError:
    assert True  # This should happen

  assert not stack.is_empty()
  assert stack.size() == 10

  assert 5 in stack
  assert 55 not in stack


if __name__ == "__main__":
   test_stack()


from collections import defaultdict


def     a__			(    snake_case    ):





  """simple docstring"""
  __SCREAMING_SNAKE_CASE     :					defaultdict[str, int]			=						defaultdict(snake_case    )
  # Creating a dictionary containing count of each word
  for word in sentence.split():
    occurrence[word] += 1
  return occurrence


if __name__ == "__main__":
   for word, count in word_occurrence("""INPUT STRING""").items():
      print(f'''{word}: {count}''')
