




"""simple docstring"""




from __future__ import annotations

import random
from collections.abc import Iterable
from typing import Any, Generic, TypeVar

a_            =   TypeVar('T', bound=bool)

class        UpperCAmelCase_  (	Generic[T]						):
		def __init__(		self							,		UpperCamelCase_   )		->   None:
					__lowercase	:       T				=   value
					__lowercase	:       RandomizedHeapNode[T] | None				=   None
					__lowercase	:       RandomizedHeapNode[T] | None				=   None
		@property
		def 					_lowerCamelCase    (		self   )		->   T:
					return self._value
		@staticmethod
		def 					_lowerCamelCase    (		UpperCamelCase_							,		UpperCamelCase_   )		->   RandomizedHeapNode[T] | None:
					if not roota:
								return roota

					if not roota:
								return roota

					if roota.value > roota.value:
								__lowercase	:       int				=   roota, roota

					if random.choice([True, False]   ):
								__lowercase	:       Dict				=   roota.right, roota.left

					__lowercase	:       Any				=   RandomizedHeapNode.merge(roota.left							,		_UpperCAmelCase   )

					return roota


class        UpperCAmelCase_  (	Generic[T]						):
		def __init__(		self							,		UpperCamelCase_ = ()   )		->   None:
					__lowercase	:       RandomizedHeapNode[T] | None				=   None

					if data:
								for item in data:
											self.insert(_UpperCAmelCase   )
		def 					_lowerCamelCase    (		self							,		UpperCamelCase_   )		->   None:
					__lowercase	:       str				=   RandomizedHeapNode.merge(self._root							,		RandomizedHeapNode(_UpperCAmelCase   )   )
		def 					_lowerCamelCase    (		self   )		->   T | None:
					__lowercase	:       Dict				=   self.top()

					if self._root is None:
								return None

					__lowercase	:       List[str]				=   RandomizedHeapNode.merge(self._root.left							,		self._root.right   )

					return result
		def 					_lowerCamelCase    (		self   )		->   T:
					if not self._root:
								raise IndexError('''Can\'t get top element for the empty heap.'''   )
					return self._root.value
		def 					_lowerCamelCase    (		self   )		->   None:
					__lowercase	:       int				=   None
		def 					_lowerCamelCase    (		self   )		->   list[Any]:
					__lowercase	:       int				=   []
					while self:
								result.append(self.pop()   )

					return result
		def __bool__(		self   )		->   bool:
					return self._root is not None


if __name__ == "__main__":
			import doctest

			doctest.testmod()









"""simple docstring"""




from collections import defaultdict







def       __UpperCAmelCase      (				__UpperCamelCase					):
			__lowercase	:       defaultdict[str, int]				=   defaultdict(__UpperCamelCase					)
			# 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}")



