




import posixpath
from pathlib import Path
from unittest.mock import patch

import pytest
from fsspec.implementations.local import AbstractFileSystem, LocalFileSystem, stringify_path
from fsspec.registry import _registry as _fsspec_registry


class  lowerCamelCase     (		lowercase__    ):






			'''simple docstring'''





			UpperCamelCase__										='''mock'''

			def __init__(			self      : str							,    *lowerCamelCase_      : Optional[int]							,    lowerCamelCase_      : int							,    **lowerCamelCase_      : str	)    -> Optional[Any]:
								super().__init__()
								__magic_name__				:						Optional[Any]     				=				LocalFileSystem(*__lowerCamelCase							,    **__lowerCamelCase	)
								__magic_name__				:						Tuple     				=				Path(__lowerCamelCase	).resolve().as_posix() + "/"

			def 				UpperCAmelCase__							(			self      : Dict							,    lowerCamelCase_      : Optional[Any]							,    *lowerCamelCase_      : Union[str, Any]							,    **lowerCamelCase_      : str	)    -> Optional[Any]:
								__magic_name__				:						Dict     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.mkdir(__lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : Optional[Any]							,    lowerCamelCase_      : List[str]							,    *lowerCamelCase_      : int							,    **lowerCamelCase_      : Tuple	)    -> Optional[int]:
								__magic_name__				:						int     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.makedirs(__lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : Union[str, Any]							,    lowerCamelCase_      : Tuple	)    -> List[str]:
								__magic_name__				:						str     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.rmdir(__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : str							,    lowerCamelCase_      : Union[str, Any]							,    lowerCamelCase_      : int=True							,    *lowerCamelCase_      : Tuple							,    **lowerCamelCase_      : str	)    -> str:
								__magic_name__				:						str     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								__magic_name__				:						List[str]     				=				self._fs.ls(__lowerCamelCase							,    detail=__lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)
								if detail:
													return [{**info, "name": info["name"][len(self.local_root_dir	) :]} for info in out]
								else:
													return [name[len(self.local_root_dir	) :] for name in out]

			def 				UpperCAmelCase__							(			self      : Optional[int]							,    lowerCamelCase_      : Optional[Any]							,    *lowerCamelCase_      : Any							,    **lowerCamelCase_      : Any	)    -> str:
								__magic_name__				:						Optional[Any]     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								__magic_name__				:						Optional[Any]     				=				dict(self._fs.info(__lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)	)
								__magic_name__				:						Union[str, Any]     				=				out["name"][len(self.local_root_dir	) :]
								return out

			def 				UpperCAmelCase__							(			self      : Any							,    lowerCamelCase_      : List[Any]							,    lowerCamelCase_      : Union[str, Any]							,    *lowerCamelCase_      : int							,    **lowerCamelCase_      : List[str]	)    -> Dict:
								__magic_name__				:						int     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								__magic_name__				:						str     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.cp_file(__lowerCamelCase							,    __lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : List[Any]							,    lowerCamelCase_      : Tuple							,    *lowerCamelCase_      : Union[str, Any]							,    **lowerCamelCase_      : str	)    -> Any:
								__magic_name__				:						Any     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.rm_file(__lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : List[str]							,    lowerCamelCase_      : Any							,    *lowerCamelCase_      : str							,    **lowerCamelCase_      : int	)    -> List[str]:
								__magic_name__				:						Optional[Any]     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.rm(__lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : Tuple							,    lowerCamelCase_      : Union[str, Any]							,    *lowerCamelCase_      : Optional[int]							,    **lowerCamelCase_      : str	)    -> List[Any]:
								__magic_name__				:						Optional[Any]     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs._open(__lowerCamelCase							,    *__lowerCamelCase							,    **__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : Optional[Any]							,    lowerCamelCase_      : str	)    -> Dict:
								__magic_name__				:						Tuple     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.created(__lowerCamelCase	)

			def 				UpperCAmelCase__							(			self      : Dict							,    lowerCamelCase_      : str	)    -> List[str]:
								__magic_name__				:						str     				=				posixpath.join(self.local_root_dir							,    self._strip_protocol(__lowerCamelCase	)	)
								return self._fs.modified(__lowerCamelCase	)


			@classmethod
			def 				UpperCAmelCase__							(			cls      : Union[str, Any]							,    lowerCamelCase_      : List[str]	)    -> Dict:
								__magic_name__				:						Optional[Any]     				=				stringify_path(__lowerCamelCase	)
								if path.startswith('''mock://'''	):
													__magic_name__				:						List[Any]     				=				path[7:]
								return path






class  lowerCamelCase     (		lowercase__    ):






			'''simple docstring'''





			UpperCamelCase__										='''tmp'''
			UpperCamelCase__										=None

			def __init__(			self      : Any							,    *lowerCamelCase_      : List[Any]							,    **lowerCamelCase_      : List[Any]	)    -> Optional[int]:
								assert self.tmp_dir is not None, "TmpDirFileSystem.tmp_dir is not set"
								super().__init__(*__lowerCamelCase							,    **__lowerCamelCase							,    local_root_dir=self.tmp_dir							,    auto_mkdir=__lowerCamelCase	)


			@classmethod
			def 				UpperCAmelCase__							(			cls      : Optional[int]							,    lowerCamelCase_      : Optional[int]	)    -> Any:
								__magic_name__				:						Tuple     				=				stringify_path(__lowerCamelCase	)
								if path.startswith('''tmp://'''	):
													__magic_name__				:						Optional[Any]     				=				path[6:]
								return path







@pytest.fixture
def 		lowercase__ (		):





					'''simple docstring'''






					__magic_name__				:						List[Any]     				=				MockFileSystem
					__magic_name__				:						List[str]     				=				TmpDirFileSystem
					yield
					del _fsspec_registry["mock"]
					del _fsspec_registry["tmp"]







@pytest.fixture
def 		lowercase__ (		__A:						Tuple				,__A:						List[Any]					):





					'''simple docstring'''






					__magic_name__				:						str     				=				tmp_path_factory.mktemp('''mockfs'''					)
					return MockFileSystem(local_root_dir=_A				,auto_mkdir=_A					)







@pytest.fixture
def 		lowercase__ (		__A:						List[Any]				,__A:						Union[str, Any]					):





					'''simple docstring'''






					__magic_name__				:						str     				=				tmp_path_factory.mktemp('''tmpfs'''					)
					with patch.object(_A				,'''tmp_dir'''				,_A					):
										yield TmpDirFileSystem()







def  lowercase_						(						_A     :       Dict		):

      """simple docstring"""




      lowerCamelCase__						:							Optional[Any]       =    len(_A		)
      for _ in range(
          0       ,   int(((no_of_elements - 1) / 2) + 1		)		):  # we don't need to traverse to end of list as
            for j in range(0       ,   no_of_elements - 1		):
                  if (
                      lst[j + 1] < lst[j]
                  ):  # applying bubble sort algorithm from left to right (or forwards)
                        lowerCamelCase__						:							Tuple       =    lst[j + 1]
                        lowerCamelCase__						:							Optional[Any]       =    lst[j]
                        lowerCamelCase__						:							Optional[Any]       =    temp
                  if (
                      lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
                  ):  # applying bubble sort algorithm from right to left (or backwards)
                        lowerCamelCase__						:							Any       =    lst[no_of_elements - 1 - j]
                        lowerCamelCase__						:							List[str]       =    lst[no_of_elements - 2 - j]
                        lowerCamelCase__						:							str       =    temp
      return lst


if __name__ == "__main__":
    print("enter the list to be sorted")
    A :       Optional[int]						=   [int(x) for x in input().split()]  # inputing elements of the list in one line
    A :       Optional[Any]						=   double_sort(lst)
    print("the sorted list is")
    print(sorted_lst)


