


'''simple docstring'''




def 				a_							(    lowercase     )      ->bool:






				'''simple docstring'''

				if not isinstance(lowercase				,    lowercase     ):
								__lowerCamelCase		:   List[Any]           =       F'Input value of [number={number}] must be an integer'
								raise TypeError(lowercase     )
				if number < 0 or number % 2 == 1:
								return False
				__lowerCamelCase		:   int           =       int(number**0.5     )
				return number == number_sqrt * (number_sqrt + 1)


if __name__ == "__main__":
				import doctest

				doctest.testmod()









'''simple docstring'''




from collections import Counter
from functools import total_ordering

from data_structures.heap.heap import Heap





@total_ordering
class _snake_case :
							"""simple docstring"""





							def __init__( self      ,					__A      ,					__A						)  ->None:



											"""simple docstring"""







											__lowerCamelCase		:   List[Any]           =       word
											__lowerCamelCase		:   Optional[Any]           =       count







							def __eq__( self      ,					__A						)  ->bool:



											"""simple docstring"""







											if not isinstance(__A      ,					__A						):
															return NotImplemented
											return self.count == other.count







							def __lt__( self      ,					__A						)  ->bool:



											"""simple docstring"""







											if not isinstance(__A      ,					__A						):
															return NotImplemented
											return self.count < other.count





def 				a_							(    lowercase				,    lowercase     )      ->list[str]:






				'''simple docstring'''

				__lowerCamelCase		:   Heap[WordCount]           =       Heap()
				__lowerCamelCase		:   int           =       Counter(lowercase     )
				heap.build_max_heap(
				    [WordCount(lowercase				,    lowercase     ) for word, count in count_by_word.items()]     )
				return [heap.extract_max().word for _ in range(min(lowercase				,    len(lowercase     )     )     )]


if __name__ == "__main__":
				import doctest

				doctest.testmod()





