





"""simple docstring"""





from __future__ import annotations

from typing import Any






class    _lowerCAmelCase  :
       """simple docstring"""




       def __init__(       self       ,					__UpperCAmelCase = 6 ):



         '''simple docstring'''

         lowerCAmelCase__     :Node | None											=				None
         lowerCAmelCase__     :Node | None											=				None
         self.create_linked_list(__UpperCAmelCase )






       def 	snake_case		(       self       ,					__UpperCAmelCase ):



         '''simple docstring'''

         lowerCAmelCase__     :Tuple											=				Node()
         lowerCAmelCase__     :Any											=				current_node
         lowerCAmelCase__     :List[Any]											=				current_node
         lowerCAmelCase__     :Union[str, Any]											=				current_node
         for _ in range(1       ,					__UpperCAmelCase ):
           lowerCAmelCase__     :Dict											=				Node()
           lowerCAmelCase__     :Dict											=				current_node
           lowerCAmelCase__     :List[str]											=				previous_node
           lowerCAmelCase__     :str											=				current_node
         lowerCAmelCase__     :str											=				self.front
         lowerCAmelCase__     :List[Any]											=				previous_node






       def 	snake_case		(       self ):



         '''simple docstring'''

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






       def 	snake_case		(       self ):



         '''simple docstring'''

         self.check_can_perform_operation()
         return self.front.data if self.front else None






       def 	snake_case		(       self       ,					__UpperCAmelCase ):



         '''simple docstring'''

         if self.rear is None:
           return

         self.check_is_full()
         if not self.is_empty():
           lowerCAmelCase__     :Optional[int]											=				self.rear.next
         if self.rear:
           lowerCAmelCase__     :List[str]											=				data






       def 	snake_case		(       self ):



         '''simple docstring'''

         self.check_can_perform_operation()
         if self.rear is None or self.front is None:
           return None
         if self.front == self.rear:
           lowerCAmelCase__     :Union[str, Any]											=				self.front.data
           lowerCAmelCase__     :List[str]											=				None
           return data

         lowerCAmelCase__     :List[str]											=				self.front
         lowerCAmelCase__     :List[Any]											=				old_front.next
         lowerCAmelCase__     :List[Any]											=				old_front.data
         lowerCAmelCase__     :int											=				None
         return data






       def 	snake_case		(       self ):



         '''simple docstring'''

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






       def 	snake_case		(       self ):



         '''simple docstring'''

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






class    _lowerCAmelCase  :
       """simple docstring"""




       def __init__(       self ):



         '''simple docstring'''

         lowerCAmelCase__     :Any | None											=				None
         lowerCAmelCase__     :Node | None											=				None
         lowerCAmelCase__     :Node | None											=				None


if __name__ == "__main__":
  import doctest

  doctest.testmod()







"""simple docstring"""





def 					__A  (_SCREAMING_SNAKE_CASE	,  _SCREAMING_SNAKE_CASE     )   ->list[str]:





  """simple docstring"""


  return [sentence[i : i + ngram_size] for i in range(len(_SCREAMING_SNAKE_CASE     ) - ngram_size + 1     )]


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

  testmod()
