


"""simple docstring"""







from __future__ import annotations

from collections.abc import Iterator
from typing import Any


class 				SCREAMING_SNAKE_CASE__    :
       """simple docstring"""


       def __init__(						self		,					snake_case__						):






         """simple docstring"""





         lowerCAmelCase					:					Any								=							data
         lowerCAmelCase					:					Node | None								=							None


class 				SCREAMING_SNAKE_CASE__    :
       """simple docstring"""


       def __init__(						self						):






         """simple docstring"""





         lowerCAmelCase					:					List[str]								=							None
         lowerCAmelCase					:					Dict								=							None

       def __iter__(						self						):






         """simple docstring"""





         lowerCAmelCase					:					List[str]								=							self.head
         while self.head:
           yield node.data
           lowerCAmelCase					:					List[Any]								=							node.next
           if node == self.head:
             break

       def __len__(						self						):






         """simple docstring"""





         return sum(1 for _ in self						)

       def __repr__(						self						):






         """simple docstring"""





         return "->".join(str(snake_case__						) for item in iter(self						)						)

       def 	lowercase__							(						self		,					snake_case__						):






         """simple docstring"""





         self.insert_nth(len(self						)		,					snake_case__						)

       def 	lowercase__							(						self		,					snake_case__						):






         """simple docstring"""





         self.insert_nth(0		,					snake_case__						)

       def 	lowercase__							(						self		,					snake_case__		,					snake_case__						):






         """simple docstring"""





         if index < 0 or index > len(self						):
           raise IndexError("list index out of range."						)
         lowerCAmelCase					:					Optional[Any]								=							Node(snake_case__						)
         if self.head is None:
           lowerCAmelCase					:					str								=							new_node  # first node points itself
           lowerCAmelCase					:					Any								=							new_node
         elif index == 0:  # insert at head
           lowerCAmelCase					:					Optional[Any]								=							self.head
           lowerCAmelCase					:					List[str]								=							new_node
         else:
           lowerCAmelCase					:					Optional[int]								=							self.head
           for _ in range(index - 1						):
             lowerCAmelCase					:					int								=							temp.next
           lowerCAmelCase					:					List[Any]								=							temp.next
           lowerCAmelCase					:					Union[str, Any]								=							new_node
           if index == len(self						) - 1:  # insert at tail
             lowerCAmelCase					:					Union[str, Any]								=							new_node

       def 	lowercase__							(						self						):






         """simple docstring"""





         return self.delete_nth(0						)

       def 	lowercase__							(						self						):






         """simple docstring"""





         return self.delete_nth(len(self						) - 1						)

       def 	lowercase__							(						self		,					snake_case__ = 0						):






         """simple docstring"""





         if not 0 <= index < len(self						):
           raise IndexError("list index out of range."						)
         lowerCAmelCase					:					List[Any]								=							self.head
         if self.head == self.tail:  # just one node
           lowerCAmelCase					:					Tuple								=							None
         elif index == 0:  # delete head node
           lowerCAmelCase					:					Tuple								=							self.tail.next.next
           lowerCAmelCase					:					List[Any]								=							self.head.next
         else:
           lowerCAmelCase					:					List[str]								=							self.head
           for _ in range(index - 1						):
             lowerCAmelCase					:					int								=							temp.next
           lowerCAmelCase					:					List[Any]								=							temp.next
           lowerCAmelCase					:					Any								=							temp.next.next
           if index == len(self						) - 1:  # delete at tail
             lowerCAmelCase					:					Any								=							temp
         return delete_node.data







       def 	lowercase__							(						self						):






         """simple docstring"""





         return len(self						) == 0

def  a__      (    ):


  '''simple docstring'''







  lowerCAmelCase					:					List[str]								=							CircularLinkedList()
  assert len(SCREAMING_SNAKE_CASE    ) == 0
  assert circular_linked_list.is_empty() is True
  assert str(SCREAMING_SNAKE_CASE    ) == ""

  try:
    circular_linked_list.delete_front()
    raise AssertionError  # This should not happen
  except IndexError:
    assert True  # This should happen

  try:
    circular_linked_list.delete_tail()
    raise AssertionError  # This should not happen
  except IndexError:
    assert True  # This should happen

  try:
    circular_linked_list.delete_nth(-1    )
    raise AssertionError
  except IndexError:
    assert True

  try:
    circular_linked_list.delete_nth(0    )
    raise AssertionError
  except IndexError:
    assert True

  assert circular_linked_list.is_empty() is True
  for i in range(5    ):
    assert len(SCREAMING_SNAKE_CASE    ) == i
    circular_linked_list.insert_nth(SCREAMING_SNAKE_CASE    ,				i + 1    )
  assert str(SCREAMING_SNAKE_CASE    ) == "->".join(str(SCREAMING_SNAKE_CASE    ) for i in range(1    ,				6    )    )

  circular_linked_list.insert_tail(6    )
  assert str(SCREAMING_SNAKE_CASE    ) == "->".join(str(SCREAMING_SNAKE_CASE    ) for i in range(1    ,				7    )    )
  circular_linked_list.insert_head(0    )
  assert str(SCREAMING_SNAKE_CASE    ) == "->".join(str(SCREAMING_SNAKE_CASE    ) for i in range(0    ,				7    )    )

  assert circular_linked_list.delete_front() == 0
  assert circular_linked_list.delete_tail() == 6
  assert str(SCREAMING_SNAKE_CASE    ) == "->".join(str(SCREAMING_SNAKE_CASE    ) for i in range(1    ,				6    )    )
  assert circular_linked_list.delete_nth(2    ) == 3

  circular_linked_list.insert_nth(2    ,				3    )
  assert str(SCREAMING_SNAKE_CASE    ) == "->".join(str(SCREAMING_SNAKE_CASE    ) for i in range(1    ,				6    )    )

  assert circular_linked_list.is_empty() is False


if __name__ == "__main__":
     import doctest

     doctest.testmod()









"""simple docstring"""







def  a__      (    SCREAMING_SNAKE_CASE   :   list[int]    ):


  '''simple docstring'''







  lowerCAmelCase					:					str								=							len(SCREAMING_SNAKE_CASE    )
  for i in range(SCREAMING_SNAKE_CASE    ):
    for j in range(i + 1    ,				SCREAMING_SNAKE_CASE    ):
      if numbers[j] < numbers[i]:
        lowerCAmelCase						,  lowerCAmelCase					:					Any								=							numbers[j], numbers[i]
  return numbers


if __name__ == "__main__":
     lowerCAmelCase__				    =       input('''Enter numbers separated by a comma:\n''').strip()
     lowerCAmelCase__				    =       [int(item) for item in user_input.split(''',''')]
     print(exchange_sort(unsorted))





