



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

_lowerCamelCase    :		Optional[int]		      =    TypeVar("""_T""")


class 						lowercase    (							Generic[_T]):
						'''simple docstring'''


						def __init__(  self    :				Optional[int]       ,	snake_case    :				Iterable[_T] | None = None	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     list[_T]						=				list(iterable or []	)
											SCREAMING_SNAKE_CASE							:     list[_T]						=				[]







						def __len__(  self    :				List[str]	):



											'''simple docstring'''


											return len(self._stacka	) + len(self._stacka	)







						def __repr__(  self    :				Tuple	):



											'''simple docstring'''


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







						def       lowerCamelCase_				(  self    :				Tuple       ,	snake_case    :				_T	):



											'''simple docstring'''


											self._stacka.append(snake_case	)







						def       lowerCamelCase_				(  self    :				Union[str, Any]	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     int						=				self._stacka.pop
											SCREAMING_SNAKE_CASE							:     int						=				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        __a			(   __lowerCAmelCase      ,	__lowerCAmelCase = 0   )     ->     list:
					SCREAMING_SNAKE_CASE							:     int						=				length or len(__lowerCAmelCase   )
					SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				False
					for i in range(length - 1   ):
										if list_data[i] > list_data[i + 1]:
															SCREAMING_SNAKE_CASE					,  SCREAMING_SNAKE_CASE							:     List[Any]						=				list_data[i + 1], list_data[i]
															SCREAMING_SNAKE_CASE							:     Any						=				True

					return list_data if not swapped else bubble_sort(__lowerCAmelCase      ,	length - 1   )


if __name__ == "__main__":
			import doctest

			doctest.testmod()