





from math import ceil




def      a__			(       lowercase__	,     lowercase__	):






   '''simple docstring'''






   UpperCAmelCase_           =list(range(0	,     lowercase__	)	)

   UpperCAmelCase_           =[item for sublist in list(device_map.values()	) for item in sublist]

   # Duplicate check
   UpperCAmelCase_           =[]
   for i in device_map_blocks:
      if device_map_blocks.count(lowercase__	) > 1 and i not in duplicate_blocks:
         duplicate_blocks.append(lowercase__	)
    # Missing blocks
   UpperCAmelCase_           =[i for i in blocks if i not in device_map_blocks]
   UpperCAmelCase_           =[i for i in device_map_blocks if i not in blocks]

   if len(lowercase__	) != 0:
      raise ValueError(
          "Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device."
          " These attention blocks were specified more than once: " + str(lowercase__	)	)
   if len(lowercase__	) != 0:
      raise ValueError(
          "There are attention blocks for this model that are not specified in the device_map. Add these attention "
          "blocks to a device on the device_map: " + str(lowercase__	)	)
   if len(lowercase__	) != 0:
      raise ValueError(
          "The device_map contains more attention blocks than this model has. Remove these from the device_map:"
          + str(lowercase__	)	)





def      a__			(       lowercase__	,     lowercase__	):






   '''simple docstring'''






   UpperCAmelCase_           =list(range(lowercase__	)	)
   UpperCAmelCase_           =int(ceil(n_layers / len(lowercase__	)	)	)
   UpperCAmelCase_           =[layers[i : i + n_blocks] for i in range(0	,     lowercase__	,     lowercase__	)]

   return dict(zip(lowercase__	,     lowercase__	)	)












def       _SCREAMING_SNAKE_CASE    (			__lowercase :      List[Any]     )    ->   Any:





    """simple docstring"""

    stooge(__lowercase      ,					0      ,					len(__lowercase     ) - 1     )
    return arr



def       _SCREAMING_SNAKE_CASE    (			__lowercase :      str      ,					__lowercase :      Dict      ,					__lowercase :      Dict     )    ->   int:





    """simple docstring"""

    if i >= h:
        return

    # If first element is smaller than the last then swap them
    if arr[i] > arr[h]:
        __A     ,						__A       =						arr[h], arr[i]

    # If there are more than 2 elements in the array
    if h - i + 1 > 2:
        __A       =						(int)((h - i + 1) / 3     )

        # Recursively sort first 2/3 elements
        stooge(__lowercase      ,					__lowercase      ,					(h - t)     )

        # Recursively sort last 2/3 elements
        stooge(__lowercase      ,					i + t      ,					(__lowercase)     )

        # Recursively sort first 2/3 elements
        stooge(__lowercase      ,					__lowercase      ,					(h - t)     )


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




