
'''simple docstring'''

from __future__ import annotations

from typing import Any


class  _UpperCAmelCase :

     """simple docstring"""

     def __init__(      self							,		lowerCAmelCase_ = 6 ):

       '''simple docstring'''

       a_      :	Node | None      =							None
       a_      :	Node | None      =							None
       self.create_linked_list(lowerCAmelCase_ )


     def 							_lowerCAmelCase  (      self							,		lowerCAmelCase_ ):

       '''simple docstring'''

       a_      :	Any      =							Node()
       a_      :	Optional[Any]      =							current_node
       a_      :	str      =							current_node
       a_      :	Optional[int]      =							current_node
       for _ in range(1							,		lowerCAmelCase_ ):
         a_      :	Optional[Any]      =							Node()
         a_      :	Union[str, Any]      =							current_node
         a_      :	Any      =							previous_node
         a_      :	Optional[Any]      =							current_node
       a_      :	str      =							self.front
       a_      :	Dict      =							previous_node


     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       return (
           self.front == self.rear
           and self.front is not None
           and self.front.data is None
       )


     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       self.check_can_perform_operation()
       return self.front.data if self.front else None


     def 							_lowerCAmelCase  (      self							,		lowerCAmelCase_ ):

       '''simple docstring'''

       if self.rear is None:
         return

       self.check_is_full()
       if not self.is_empty():
         a_      :	Optional[int]      =							self.rear.next
       if self.rear:
         a_      :	str      =							data


     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       self.check_can_perform_operation()
       if self.rear is None or self.front is None:
         return None
       if self.front == self.rear:
         a_      :	int      =							self.front.data
         a_      :	Optional[Any]      =							None
         return data

       a_      :	Tuple      =							self.front
       a_      :	Dict      =							old_front.next
       a_      :	Dict      =							old_front.data
       a_      :	List[str]      =							None
       return data


     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       if self.is_empty():
         raise Exception("""Empty Queue""" )






     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       if self.rear and self.rear.next == self.front:
         raise Exception("""Full Queue""" )







class  _UpperCAmelCase :

     """simple docstring"""

     def __init__(      self ):

       '''simple docstring'''

       a_      :	Any | None      =							None
       a_      :	Node | None      =							None
       a_      :	Node | None      =							None


if __name__ == "__main__":
    import doctest

    doctest.testmod()




'''simple docstring'''

def 	_snake_case						(      A_       :    list   ):
  """simple docstring"""







  if len(A_   ) <= 1:
    return lst

  a_      :	Any      =							1

  while i < len(A_   ):
    if lst[i - 1] <= lst[i]:
      i += 1
    else:
      a_      , a_      :	int      =							lst[i], lst[i - 1]
      i -= 1
      if i == 0:
        a_      :	List[str]      =							1

  return lst


if __name__ == "__main__":
    __snake_case:  List[Any]								=			input("Enter numbers separated by a comma:\n").strip()
    __snake_case:  Optional[int]								=			[int(item) for item in user_input.split(",")]
    print(gnome_sort(unsorted))


