





"""simple docstring"""



from math import ceil







def 		__lowercase					(       snake_case_  :  Optional[Any]    ,snake_case_  :  Dict						)       ->Union[str, Any]:



    '''simple docstring'''







    __A   :						Optional[Any]									=					list(range(0    ,snake_case_						)						)

    __A   :						List[Any]									=					[item for sublist in list(device_map.values()						) for item in sublist]

    # Duplicate check
    __A   :						List[Any]									=					[]
    for i in device_map_blocks:
        if device_map_blocks.count(snake_case_						) > 1 and i not in duplicate_blocks:
            duplicate_blocks.append(snake_case_						)
    # Missing blocks
    __A   :						Optional[int]									=					[i for i in blocks if i not in device_map_blocks]
    __A   :						List[str]									=					[i for i in device_map_blocks if i not in blocks]

    if len(snake_case_						) != 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(snake_case_						)						)
    if len(snake_case_						) != 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(snake_case_						)						)
    if len(snake_case_						) != 0:
        raise ValueError(
            '''The device_map contains more attention blocks than this model has. Remove these from the device_map:'''
            + str(snake_case_						)						)







def 		__lowercase					(       snake_case_  :  List[Any]    ,snake_case_  :  Optional[int]						)       ->Any:



    '''simple docstring'''







    __A   :						int									=					list(range(snake_case_						)						)
    __A   :						Any									=					int(ceil(n_layers / len(snake_case_						)						)						)
    __A   :						str									=					[layers[i : i + n_blocks] for i in range(0    ,snake_case_    ,snake_case_						)]

    return dict(zip(snake_case_    ,snake_case_						)						)











"""simple docstring"""



def 		__lowercase					(       snake_case_  :  int						)       ->Optional[Any]:



    '''simple docstring'''







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







def 		__lowercase					(       snake_case_  :  Optional[Any]    ,snake_case_  :  Union[str, Any]    ,snake_case_  :  Any						)       ->Tuple:



    '''simple docstring'''







    if i >= h:
        return

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

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

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

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

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


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




