
'''simple docstring'''

from unittest import TestCase

from datasets import Sequence, Value
from datasets.arrow_dataset import Dataset


class  _UpperCAmelCase ( lowerCAmelCase__    ):

     """simple docstring"""

     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       return [
           {"col_1": 3, "col_2": "a"},
           {"col_1": 2, "col_2": "b"},
           {"col_1": 1, "col_2": "c"},
           {"col_1": 0, "col_2": "d"},
       ]


     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       a_      :	Union[str, Any]      =							{"""col_1""": [3, 2, 1, 0], """col_2""": ["""a""", """b""", """c""", """d"""]}
       return Dataset.from_dict(lowerCAmelCase_ )


     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       a_      :	Optional[int]      =							self._create_example_records()
       a_      :	List[Any]      =							Dataset.from_list(lowerCAmelCase_ )
       self.assertListEqual(dset.column_names							,		["""col_1""", """col_2"""] )
       for i, r in enumerate(lowerCAmelCase_ ):
         self.assertDictEqual(lowerCAmelCase_							,		example_records[i] )


     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       a_      :	Tuple      =							self._create_example_records()
       a_      :	Optional[Any]      =							Dataset.from_list(lowerCAmelCase_ )
       a_      :	Dict      =							Dataset.from_dict({k: [r[k] for r in example_records] for k in example_records[0]} )
       self.assertEqual(dset.info							,		dset_from_dict.info )


     def 							_lowerCAmelCase  (      self ):  # checks what happens with missing columns

       '''simple docstring'''

       a_      :	Optional[int]      =							[{"""col_1""": 1}, {"""col_2""": """x"""}]
       a_      :	Any      =							Dataset.from_list(lowerCAmelCase_ )
       self.assertDictEqual(dset[0]							,		{"""col_1""": 1} )
       self.assertDictEqual(dset[1]							,		{"""col_1""": None} )  # NB: first record is used for columns


     def 							_lowerCAmelCase  (      self ):  # checks if the type can be inferred from the second record

       '''simple docstring'''

       a_      :	Optional[int]      =							[{"""col_1""": []}, {"""col_1""": [1, 2]}]
       a_      :	Dict      =							Dataset.from_list(lowerCAmelCase_ )
       self.assertEqual(dset.info.features["""col_1"""]							,		Sequence(Value("""int64""" ) ) )






     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       a_      :	Optional[int]      =							Dataset.from_list([] )
       self.assertEqual(len(lowerCAmelCase_ )							,		0 )
       self.assertListEqual(dset.column_names							,		[] )




'''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))


