'''simple docstring'''




class    a__				(       __SCREAMING_SNAKE_CASE			):
     pass







class    a__				(       __SCREAMING_SNAKE_CASE			):
     pass







class    a__				:






     def __init__(			self		:		Dict   ):





         """simple docstring"""



         __lowerCamelCase          =  [
             [],
             [],
             [],
         ]






     def        SCREAMING_SNAKE_CASE__       (			self		:		List[str]  ,    a		:		Optional[int]  ,    a		:		Dict   ):





         """simple docstring"""



         try:
             if len(self.queues[priority]   ) >= 1_00:
                 raise OverflowError('''Maximum queue size is 100'''   )
             self.queues[priority].append(_snake_case   )
         except IndexError:
             raise ValueError('''Valid priorities are 0, 1, and 2'''   )






     def        SCREAMING_SNAKE_CASE__       (			self		:		Optional[int]   ):





         """simple docstring"""



         for queue in self.queues:
             if queue:
                 return queue.pop(0   )
         raise UnderFlowError('''All queues are empty'''   )






     def __str__(			self		:		Optional[int]   ):





         """simple docstring"""



         return "\n".join(f"""Priority {i}: {q}""" for i, q in enumerate(self.queues   )   )







class    a__				:






     def __init__(			self		:		Tuple   ):





         """simple docstring"""



         __lowerCamelCase          =  []






     def        SCREAMING_SNAKE_CASE__       (			self		:		List[Any]  ,    a		:		Dict   ):





         """simple docstring"""



         if len(self.queue   ) == 1_00:
             raise OverFlowError('''Maximum queue size is 100'''   )
         self.queue.append(_snake_case   )






     def        SCREAMING_SNAKE_CASE__       (			self		:		Any   ):





         """simple docstring"""



         if not self.queue:
             raise UnderFlowError('''The queue is empty'''   )
         else:
             __lowerCamelCase          =  min(self.queue   )
             self.queue.remove(_snake_case   )
             return data






     def __str__(			self		:		Tuple   ):





         """simple docstring"""



         return str(self.queue   )







def __lowerCAmelCase			(							)     ->   List[str]:
    __lowerCamelCase          =  FixedPriorityQueue()
    fpq.enqueue(0    ,  10    )
    fpq.enqueue(1    ,  70    )
    fpq.enqueue(0    ,  1_00    )
    fpq.enqueue(2    ,  1    )
    fpq.enqueue(2    ,  5    )
    fpq.enqueue(1    ,  7    )
    fpq.enqueue(2    ,  4    )
    fpq.enqueue(1    ,  64    )
    fpq.enqueue(0    ,  1_28    )
    print(_SCREAMING_SNAKE_CASE    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )
    print(_SCREAMING_SNAKE_CASE    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )
    print(fpq.dequeue()    )






def __lowerCAmelCase			(							)     ->   Optional[Any]:
    __lowerCamelCase          =  ElementPriorityQueue()
    epq.enqueue(10    )
    epq.enqueue(70    )
    epq.enqueue(1_00    )
    epq.enqueue(1    )
    epq.enqueue(5    )
    epq.enqueue(7    )
    epq.enqueue(4    )
    epq.enqueue(64    )
    epq.enqueue(1_28    )
    print(_SCREAMING_SNAKE_CASE    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )
    print(_SCREAMING_SNAKE_CASE    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )
    print(epq.dequeue()    )


if __name__ == "__main__":
  fixed_priority_queue()
  element_priority_queue()

'''simple docstring'''




def __lowerCAmelCase			(							UpperCamelCase__    )     ->   str:
    return "".join(chr(ord(UpperCamelCase__    ) - 32    ) if '''a''' <= char <= '''z''' else char for char in word    )


if __name__ == "__main__":
  from doctest import testmod

  testmod()
