'''simple docstring'''

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 							lowercase_    (     _A						):
    a_             =   """mock"""







    def __init__(	self       ,     *UpperCamelCase__       ,     UpperCamelCase__       ,     **UpperCamelCase__				)				->       List[Any]:





     """simple docstring"""

     super().__init__()
     UpperCAmelCase_				       =					LocalFileSystem(*UpperCamelCase__       ,     **UpperCamelCase__				)
     UpperCAmelCase_				       =					Path(UpperCamelCase__				).resolve().as_posix() + "/"







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       Optional[int]:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.mkdir(UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       List[str]:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.makedirs(UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__				)				->       Optional[int]:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.rmdir(UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     UpperCamelCase__=True       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       Tuple:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     UpperCAmelCase_				       =					self._fs.ls(UpperCamelCase__       ,     detail=UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)
     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   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       Tuple:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     UpperCAmelCase_				       =					dict(self._fs.info(UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				)
     UpperCAmelCase_				       =					out["name"][len(self.local_root_dir				) :]
     return out







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       Any:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.cp_file(UpperCamelCase__       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       List[str]:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.rm_file(UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       List[str]:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.rm(UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       Optional[Any]:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs._open(UpperCamelCase__       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__				)				->       List[Any]:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.created(UpperCamelCase__				)







    def   lowerCamelCase_    (	self       ,     UpperCamelCase__				)				->       Any:





     """simple docstring"""

     UpperCAmelCase_				       =					posixpath.join(self.local_root_dir       ,     self._strip_protocol(UpperCamelCase__				)				)
     return self._fs.modified(UpperCamelCase__				)







    @classmethod
    def   lowerCamelCase_    (	cls       ,     UpperCamelCase__				)				->       Union[str, Any]:





     """simple docstring"""

     UpperCAmelCase_				       =					stringify_path(UpperCamelCase__				)
     if path.startswith("mock://"				):
      UpperCAmelCase_				       =					path[7:]
     return path


class 							lowercase_    (     _A						):
    a_             =   """tmp"""
    a_             =   None







    def __init__(	self       ,     *UpperCamelCase__       ,     **UpperCamelCase__				)				->       Dict:





     """simple docstring"""

     assert self.tmp_dir is not None, "TmpDirFileSystem.tmp_dir is not set"
     super().__init__(*UpperCamelCase__       ,     **UpperCamelCase__       ,     local_root_dir=self.tmp_dir       ,     auto_mkdir=UpperCamelCase__				)







    @classmethod
    def   lowerCamelCase_    (	cls       ,     UpperCamelCase__				)				->       Optional[Any]:





     """simple docstring"""

     UpperCAmelCase_				       =					stringify_path(UpperCamelCase__				)
     if path.startswith("tmp://"				):
      UpperCAmelCase_				       =					path[6:]
     return path



@pytest.fixture
def lowerCamelCase__						(       ):
 UpperCAmelCase_				       =					MockFileSystem
 UpperCAmelCase_				       =					TmpDirFileSystem
 yield
 del _fsspec_registry["mock"]
 del _fsspec_registry["tmp"]



@pytest.fixture
def lowerCamelCase__						(       A_       ,			A_       ):
 UpperCAmelCase_				       =					tmp_path_factory.mktemp("mockfs"       )
 return MockFileSystem(local_root_dir=A_       ,			auto_mkdir=A_       )



@pytest.fixture
def lowerCamelCase__						(       A_       ,			A_       ):
 UpperCAmelCase_				       =					tmp_path_factory.mktemp("tmpfs"       )
 with patch.object(A_       ,			"tmp_dir"       ,			A_       ):
  yield TmpDirFileSystem()

'''simple docstring'''

def lowerCamelCase__						(       A_       ):
 UpperCAmelCase_				       =					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)
    UpperCAmelCase_				       =					lst[j + 1]
    UpperCAmelCase_				       =					lst[j]
    UpperCAmelCase_				       =					temp
   if (
       lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
   ):  # applying bubble sort algorithm from right to left (or backwards)
    UpperCAmelCase_				       =					lst[no_of_elements - 1 - j]
    UpperCAmelCase_				       =					lst[no_of_elements - 2 - j]
    UpperCAmelCase_				       =					temp
 return lst


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