





from typing import Any


class 					__magic_name__  :





     """simple docstring"""



     def __init__(							self       :Any  ):





        '''simple docstring'''




        A_					:				str          =			[]
        A_					:				Optional[int]          =			0



     def __str__(							self       :Any  ):





        '''simple docstring'''




        A_					:				List[Any]          =			"<" + str(self.stack  )[1:-1] + ">"
        return printed



     def 						SCREAMING_SNAKE_CASE		(							self       :Optional[int]			,      snake_case       :Any  ):





        '''simple docstring'''




        self.stack.append(snake_case  )
        A_					:				Union[str, Any]          =			self.length + 1



     def 						SCREAMING_SNAKE_CASE		(							self       :List[str]  ):





        '''simple docstring'''




        self.rotate(1  )
        A_					:				Union[str, Any]          =			self.stack[self.length - 1]
        A_					:				Union[str, Any]          =			self.stack[:-1]
        self.rotate(self.length - 1  )
        A_					:				Union[str, Any]          =			self.length - 1
        return dequeued



     def 						SCREAMING_SNAKE_CASE		(							self       :int			,      snake_case       :int  ):





        '''simple docstring'''




        for _ in range(snake_case  ):
           A_					:				Any          =			self.stack[0]
           A_					:				Union[str, Any]          =			self.stack[1:]
           self.put(snake_case  )
           A_					:				Optional[Any]          =			self.length - 1



     def 						SCREAMING_SNAKE_CASE		(							self       :int  ):





        '''simple docstring'''




        A_					:				List[str]          =			self.get()
        self.put(snake_case  )
        self.rotate(self.length - 1  )
        return front





     def 						SCREAMING_SNAKE_CASE		(							self       :Any  ):





        '''simple docstring'''




        return self.length








from __future__ import annotations

def      __snake_case						(					_lowerCAmelCase : int	) ->						list[int]:
   assert (
       isinstance(_lowerCAmelCase				,				_lowerCAmelCase	) and mask > 0
   ), f"mask needs to be positive integer, your input {mask}"
   A_					:				Optional[Any]          =			[]
   A_					:				Optional[int]          =			mask

   while submask:
      all_submasks.append(_lowerCAmelCase	)
      A_					:				List[str]          =			(submask - 1) & mask

   return all_submasks


if __name__ == "__main__":
 import doctest

 doctest.testmod()
