

"""simple docstring"""




class 		a_	:



      """simple docstring"""







      class 		a_	:



            """simple docstring"""







            __UpperCAmelCase      		=				'_prev', '_data', '_next'
            def __init__(				self					:							Dict      ,snake_case					:							Tuple      ,snake_case					:							Optional[int]      ,snake_case					:							List[str]    ):
                 SCREAMING_SNAKE_CASE										=link_p
                 SCREAMING_SNAKE_CASE										=element
                 SCREAMING_SNAKE_CASE										=link_n


            def 	_lowerCAmelCase					(				self					:							Dict    ):
                 return (
                     f' Prev -> {self._prev is not None}, Next -> {self._next is not None}'
                 )







      def __init__(				self					:							Any    ):
           SCREAMING_SNAKE_CASE										=self._Node(snake_case      ,snake_case      ,snake_case    )
           SCREAMING_SNAKE_CASE										=self._Node(snake_case      ,snake_case      ,snake_case    )
           SCREAMING_SNAKE_CASE										=self._trailer
           SCREAMING_SNAKE_CASE										=self._header
           SCREAMING_SNAKE_CASE										=0
      def __len__(				self					:							Union[str, Any]    ):
           return self._size
      def 	_lowerCAmelCase					(				self					:							int    ):
           return self.__len__() == 0
      def 	_lowerCAmelCase					(				self					:							Tuple      ,snake_case					:							Dict      ,snake_case					:							Union[str, Any]      ,snake_case					:							Optional[int]    ):
           # Create new_node by setting it's prev.link -> header
           # setting it's next.link -> trailer
           SCREAMING_SNAKE_CASE										=self._Node(snake_case      ,snake_case      ,snake_case    )
           SCREAMING_SNAKE_CASE										=new_node
           SCREAMING_SNAKE_CASE										=new_node
           self._size += 1
           return self


      def 	_lowerCAmelCase					(				self					:							Tuple      ,snake_case					:							Optional[Any]    ):
           SCREAMING_SNAKE_CASE										=node._prev
           SCREAMING_SNAKE_CASE										=node._next

           SCREAMING_SNAKE_CASE										=successor
           SCREAMING_SNAKE_CASE										=predecessor
           self._size -= 1
           SCREAMING_SNAKE_CASE										=node._data
           SCREAMING_SNAKE_CASE										=SCREAMING_SNAKE_CASE										=SCREAMING_SNAKE_CASE										=None
           del node
           return temp







class 		a_	(							_DoublyLinkedBase					):



      """simple docstring"""







      def 	_lowerCAmelCase					(				self					:							Dict    ):
           if self.is_empty():
                raise Exception('List is empty'    )
           return self._header._next._data
      def 	_lowerCAmelCase					(				self					:							str    ):
           if self.is_empty():
                raise Exception('List is empty'    )
           return self._trailer._prev._data
      def 	_lowerCAmelCase					(				self					:							List[Any]      ,snake_case					:							Optional[Any]    ):
           return self._insert(self._header      ,snake_case      ,self._header._next    )
      def 	_lowerCAmelCase					(				self					:							Dict      ,snake_case					:							Tuple    ):
           return self._insert(self._trailer._prev      ,snake_case      ,self._trailer    )
      def 	_lowerCAmelCase					(				self					:							Optional[int]    ):
           if self.is_empty():
                raise IndexError('remove_first from empty list'    )
           return self._delete(self._header._next    )


      def 	_lowerCAmelCase					(				self					:							Any    ):
           if self.is_empty():
                raise IndexError('remove_first from empty list'    )
           return self._delete(self._trailer._prev    )




def       snake_case__    (       lowerCAmelCase_      ):





     """simple docstring"""







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


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

