



'''simple docstring'''





from __future__ import annotations

from typing import Any



class  snake_case__						:
 def __init__(   self						:							Union[str, Any]      ,     __a						:							int = 6  )      ->   None:







       '''simple docstring'''
       __snake_case :   Node | None													=    None
       __snake_case :   Node | None													=    None
       self.create_linked_list(__a  )
 def A_   (   self						:							Dict      ,     __a						:							int  )      ->   None:







       '''simple docstring'''
       __snake_case :   List[Any]													=    Node()
       __snake_case :   List[Any]													=    current_node
       __snake_case :   List[Any]													=    current_node
       __snake_case :   List[Any]													=    current_node
       for _ in range(1      ,     __a  ):
             __snake_case :   Tuple													=    Node()
             __snake_case :   List[Any]													=    current_node
             __snake_case :   Any													=    previous_node
             __snake_case :   List[str]													=    current_node
       __snake_case :   Optional[Any]													=    self.front
       __snake_case :   Union[str, Any]													=    previous_node
 def A_   (   self						:							Any  )      ->   bool:







       '''simple docstring'''
       return (
           self.front == self.rear
           and self.front is not None
           and self.front.data is None
       )
 def A_   (   self						:							Optional[int]  )      ->   Any | None:







       '''simple docstring'''
       self.check_can_perform_operation()
       return self.front.data if self.front else None
 def A_   (   self						:							Dict      ,     __a						:							Any  )      ->   None:







       '''simple docstring'''
       if self.rear is None:
             return

       self.check_is_full()
       if not self.is_empty():
             __snake_case :   Tuple													=    self.rear.next
       if self.rear:
             __snake_case :   Dict													=    data
 def A_   (   self						:							Optional[Any]  )      ->   Any:







       '''simple docstring'''
       self.check_can_perform_operation()
       if self.rear is None or self.front is None:
             return None
       if self.front == self.rear:
             __snake_case :   Optional[int]													=    self.front.data
             __snake_case :   str													=    None
             return data

       __snake_case :   Tuple													=    self.front
       __snake_case :   Dict													=    old_front.next
       __snake_case :   Optional[Any]													=    old_front.data
       __snake_case :   Dict													=    None
       return data
 def A_   (   self						:							str  )      ->   None:







       '''simple docstring'''
       if self.is_empty():
             raise Exception('Empty Queue'  )





 def A_   (   self						:							Tuple  )      ->   None:







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



class  snake_case__						:
 def __init__(   self						:							Optional[int]  )      ->   None:







       '''simple docstring'''
       __snake_case :   Any | None													=    None
       __snake_case :   Node | None													=    None
       __snake_case :   Node | None													=    None


if __name__ == "__main__":
    import doctest

    doctest.testmod()








'''simple docstring'''





from __future__ import annotations





def   a_   (		_UpperCAmelCase    :      list[int]				)    ->  bool:
      return len(set(_UpperCAmelCase				)				) == len(_UpperCAmelCase				)


if __name__ == "__main__":
    import doctest

    doctest.testmod()



