






class 		lowerCAmelCase     ( __a			):

					'''simple docstring'''

					pass







class 		lowerCAmelCase     ( __a			):

					'''simple docstring'''

					pass







class 		lowerCAmelCase     :

					'''simple docstring'''

					def __init__(  self				:	Tuple							)			->  Tuple:


												"""simple docstring"""

												__lowercase      :							Dict				=     [
												    [],
												    [],
												    [],
												]



					def       lowerCAmelCase				(  self				:	str		,     __a				:	int		,     __a				:	int							)			->  None:


												"""simple docstring"""

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



					def       lowerCAmelCase				(  self				:	Any							)			->  int:


												"""simple docstring"""

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



					def __str__(  self				:	Any							)			->  str:


												"""simple docstring"""

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







class 		lowerCAmelCase     :

					'''simple docstring'''

					def __init__(  self				:	List[str]							)			->  Dict:


												"""simple docstring"""

												__lowercase      :							Dict				=     []



					def       lowerCAmelCase				(  self				:	Optional[int]		,     __a				:	int							)			->  None:


												"""simple docstring"""

												if len(self.queue							) == 100:
																			raise OverFlowError("""Maximum queue size is 100"""							)
												self.queue.append(__a							)



					def       lowerCAmelCase				(  self				:	int							)			->  int:


												"""simple docstring"""

												if not self.queue:
																			raise UnderFlowError("""The queue is empty"""							)
												else:
																			__lowercase      :							Optional[int]				=     min(self.queue							)
																			self.queue.remove(__a							)
																			return data



					def __str__(  self				:	Any							)			->  str:


												"""simple docstring"""

												return str(self.queue							)







def       snake_case_						(     ):
							__lowercase      :							Any				=     FixedPriorityQueue()
							fpq.enqueue(0       ,       10      )
							fpq.enqueue(1       ,       70      )
							fpq.enqueue(0       ,       100      )
							fpq.enqueue(2       ,       1      )
							fpq.enqueue(2       ,       5      )
							fpq.enqueue(1       ,       7      )
							fpq.enqueue(2       ,       4      )
							fpq.enqueue(1       ,       64      )
							fpq.enqueue(0       ,       128      )
							print(lowerCAmelCase_      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
							print(lowerCAmelCase_      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
							print(fpq.dequeue()      )
def       snake_case_						(     ):
							__lowercase      :							Any				=     ElementPriorityQueue()
							epq.enqueue(10      )
							epq.enqueue(70      )
							epq.enqueue(100      )
							epq.enqueue(1      )
							epq.enqueue(5      )
							epq.enqueue(7      )
							epq.enqueue(4      )
							epq.enqueue(64      )
							epq.enqueue(128      )
							print(lowerCAmelCase_      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )
							print(lowerCAmelCase_      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )
							print(epq.dequeue()      )


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







def       snake_case_		(     lowerCAmelCase_       :						int       ,       lowerCAmelCase_       :						int      ):
							return int((input_a, input_a).count(0      ) == 0      )
def       snake_case_		(     ):
							assert and_gate(0       ,       0      ) == 0
							assert and_gate(0       ,       1      ) == 0
							assert and_gate(1       ,       0      ) == 0
							assert and_gate(1       ,       1      ) == 1


if __name__ == "__main__":
	test_and_gate()
	print(and_gate(1, 0))
	print(and_gate(0, 0))
	print(and_gate(0, 1))
	print(and_gate(1, 1))