




from __future__ import annotations

from typing import Any







def SCREAMING_SNAKE_CASE    (	lowercase_						)       ->	None:



       """simple docstring"""

       create_state_space_tree(lowercase_			,      []			,      0						)







def SCREAMING_SNAKE_CASE    (	lowercase_			,      lowercase_			,      lowercase_						)       ->	None:



       """simple docstring"""

       if index == len(lowercase_						):
              print(lowercase_						)
              return

       create_state_space_tree(lowercase_			,      lowercase_			,      index + 1						)
       current_subsequence.append(sequence[index]						)
       create_state_space_tree(lowercase_			,      lowercase_			,      index + 1						)
       current_subsequence.pop()


if __name__ == "__main__":
  _lowerCamelCase     :		list[Any]								=       [3, 1, 2, 4]
  generate_all_subsequences(seq)

  seq.clear()
  seq.extend(["""A""", """B""", """C"""])
  generate_all_subsequences(seq)








class     UpperCamelCase_   :

    '''simple docstring'''






    def __init__(      self				:     List[str] ,			UpperCAmelCase__				:     int)						->Union[str, Any]:





           '''simple docstring'''

           A__							=   n
           A__							=   [None] * self.n
           A__							=   0  # index of the first element
           A__							=   0
           A__							=   0


    def __len__(      self				:     List[Any])						->int:





           '''simple docstring'''

           return self.size


    def 	SCREAMING_SNAKE_CASE							(      self				:     List[Any])						->bool:





           '''simple docstring'''

           return self.size == 0


    def 	SCREAMING_SNAKE_CASE							(      self				:     str)						->List[Any]:





           '''simple docstring'''

           return False if self.is_empty() else self.array[self.front]


    def 	SCREAMING_SNAKE_CASE							(      self				:     List[str] ,			UpperCAmelCase__				:     str)						->Any:





           '''simple docstring'''

           if self.size >= self.n:
                  raise Exception('''QUEUE IS FULL''')

           A__							=   data
           A__							=   (self.rear + 1) % self.n
           self.size += 1
           return self





    def 	SCREAMING_SNAKE_CASE							(      self				:     Union[str, Any])						->Any:





           '''simple docstring'''

           if self.size == 0:
                  raise Exception('''UNDERFLOW''')

           A__							=   self.array[self.front]
           A__							=   None
           A__							=   (self.front + 1) % self.n
           self.size -= 1
           return temp


