
"""simple docstring"""







from collections.abc import Iterable
from typing import Generic, TypeVar

lowerCamelCase__   					=		TypeVar("""_T""")




class  A__       (	Generic[_T]):

		def __init__(      self       ,		_SCREAMING_SNAKE_CASE = None ):
			__lowerCAmelCase			:						list[_T]									=      list(iterable or [] )
			__lowerCAmelCase			:						list[_T]									=      []

		def __len__(      self ):
			return len(self._stacka ) + len(self._stacka )

		def __repr__(      self ):
			return f"Queue({tuple(self._stacka[::-1] + self._stacka )})"

		def 							__lowerCamelCase							(      self       ,		_SCREAMING_SNAKE_CASE ):
			self._stacka.append(_SCREAMING_SNAKE_CASE )







		def 							__lowerCamelCase							(      self ):
			__lowerCAmelCase			:						Union[str, Any]									=      self._stacka.pop
			__lowerCAmelCase			:						List[Any]									=      self._stacka.append

			if not self._stacka:
				while self._stacka:
					stacka_append(stacka_pop() )

			if not self._stacka:
				raise IndexError('Queue is empty' )
			return self._stacka.pop()


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

							testmod()


def 	snake_case__			(    SCREAMING_SNAKE_CASE_		:    str			):



     '''simple docstring'''





     if not all(char in '01' for char in bin_string			):
          raise ValueError('Non-binary value was passed to the function'			)
     if not bin_string:
          raise ValueError('Empty string was passed to the function'			)
     lowercase__    :   Union[str, Any]      =       ''
     while len(SCREAMING_SNAKE_CASE_			) % 3 != 0:
          lowercase__    :   List[str]      =       '0' + bin_string
     lowercase__    :   Any      =       [
         bin_string[index : index + 3]
         for index in range(len(SCREAMING_SNAKE_CASE_			)			)
         if index % 3 == 0
     ]
     for bin_group in bin_string_in_3_list:
          lowercase__    :   str      =       0
          for index, val in enumerate(SCREAMING_SNAKE_CASE_			):
               oct_val += int(2 ** (2 - index) * int(SCREAMING_SNAKE_CASE_			)			)
          oct_string += str(SCREAMING_SNAKE_CASE_			)
     return oct_string


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

       testmod()

