"""simple docstring"""


from collections import Counter
from functools import total_ordering

from data_structures.heap.heap import Heap




@total_ordering
class 					UpperCamelCase   :







       def __init__(					self,				lowerCAmelCase__,				lowerCAmelCase__) -> None:
            snake_case_   			=   word
            snake_case_   			=   count







       def __eq__(					self,				lowerCAmelCase__) -> bool:
            if not isinstance(lowerCAmelCase__,				lowerCAmelCase__):
                 return NotImplemented
            return self.count == other.count







       def __lt__(					self,				lowerCAmelCase__) -> bool:
            if not isinstance(lowerCAmelCase__,				lowerCAmelCase__):
                 return NotImplemented
            return self.count < other.count







def    UpperCAmelCase       (						UpperCAmelCase		,   UpperCAmelCase   )							-> list[str]:
     snake_case_   			=   Heap()
     snake_case_   			=   Counter(UpperCAmelCase   )
     heap.build_max_heap(
         [WordCount(UpperCAmelCase		,   UpperCAmelCase   ) for word, count in count_by_word.items()]   )
     return [heap.extract_max().word for _ in range(min(UpperCAmelCase		,   len(UpperCAmelCase   )   )   )]


if __name__ == "__main__":
    import doctest

    doctest.testmod()


"""simple docstring"""


from math import factorial







def    UpperCAmelCase       (						UpperCAmelCase		,   UpperCAmelCase   )							-> List[str]:
     return factorial(UpperCAmelCase   ) / (factorial(UpperCAmelCase   ) * factorial(n - r   ))







def    UpperCAmelCase       (						)							-> Optional[Any]:
     snake_case_   			=   0

     for i in range(1		,   101   ):
          for j in range(1		,   i + 1   ):
               if combinations(UpperCAmelCase		,   UpperCAmelCase   ) > 1e6:
                    total += 1
     return total


if __name__ == "__main__":
    print(solution())

