
def a__    (       A_					):






  '''simple docstring'''





  if len(A_					) <= 1:
    return lst

  __magic_name__				     =       1

  while i < len(A_					):
    if lst[i - 1] <= lst[i]:
      i += 1
    else:
      __magic_name__     ,    __magic_name__				     =       lst[i], lst[i - 1]
      i -= 1
      if i == 0:
        __magic_name__				     =       1

  return lst


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





'''simple docstring'''




from __future__ import annotations

from bisect import bisect_left
from functools import total_ordering
from heapq import merge

@total_ordering
class 		UpperCAmelCase_      (  __lowercase		):





     def __lt__( self       :      Optional[int]    ,      UpperCAmelCase__       :      List[str]    )				->  List[Any]:
        return self[-1] < other[-1]





     def __eq__( self       :      str    ,      UpperCAmelCase__       :      List[str]    )				->  Tuple:
        return self[-1] == other[-1]





def 	a_					( lowerCamelCase	:     list				):
   lowerCAmelCase     =			[]
   # sort into stacks
   for element in collection:
      lowerCAmelCase     =			Stack([element]				)
      lowerCAmelCase     =			bisect_left(lowerCamelCase	, lowerCamelCase				)
      if i != len(lowerCamelCase				):
         stacks[i].append(lowerCamelCase				)
      else:
         stacks.append(lowerCamelCase				)

    # use a heap-based merge to merge stack efficiently
   lowerCAmelCase     =			merge(*(reversed(lowerCamelCase				) for stack in stacks)				)
   return collection


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





