

from __future__ import annotations

from typing import Any







class  lowercase				:




				def __init__(					self      ,   snake_case = 6       ):
											snake_case_							=    None
											snake_case_							=    None
											self.create_linked_list(snake_case       )




				def     a							(					self      ,   snake_case       ):
											snake_case_							=    Node()
											snake_case_							=    current_node
											snake_case_							=    current_node
											snake_case_							=    current_node
											for _ in range(1      ,   snake_case       ):
																		snake_case_							=    Node()
																		snake_case_							=    current_node
																		snake_case_							=    previous_node
																		snake_case_							=    current_node
											snake_case_							=    self.front
											snake_case_							=    previous_node




				def     a							(					self       ):
											return (
											    self.front == self.rear
											    and self.front is not None
											    and self.front.data is None
											)




				def     a							(					self       ):
											self.check_can_perform_operation()
											return self.front.data if self.front else None




				def     a							(					self      ,   snake_case       ):
											if self.rear is None:
																		return

											self.check_is_full()
											if not self.is_empty():
																		snake_case_							=    self.rear.next
											if self.rear:
																		snake_case_							=    data




				def     a							(					self       ):
											self.check_can_perform_operation()
											if self.rear is None or self.front is None:
																		return None
											if self.front == self.rear:
																		snake_case_							=    self.front.data
																		snake_case_							=    None
																		return data

											snake_case_							=    self.front
											snake_case_							=    old_front.next
											snake_case_							=    old_front.data
											snake_case_							=    None
											return data




				def     a							(					self       ):
											if self.is_empty():
																		raise Exception('Empty Queue'       )




				def     a							(					self       ):
											if self.rear and self.rear.next == self.front:
																		raise Exception('Full Queue'       )







class  lowercase				:




				def __init__(					self       ):
											snake_case_							=    None
											snake_case_							=    None
											snake_case_							=    None


if __name__ == "__main__":
					import doctest

					doctest.testmod()







from abc import ABC, abstractmethod
from argparse import ArgumentParser







class  lowercase				(       lowercase_			):




				@staticmethod
				@abstractmethod
				def     a							(					snake_case       ):
											raise NotImplementedError()




				@abstractmethod
				def     a							(					self       ):
											raise NotImplementedError()




