

def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		list       ):





    """simple docstring"""


    if len(_SCREAMING_SNAKE_CASE       ) <= 1:
        return [tuple(_SCREAMING_SNAKE_CASE       )]

    SCREAMING_SNAKE_CASE_									=						[]

    def generate(_SCREAMING_SNAKE_CASE					:		int ,   _SCREAMING_SNAKE_CASE					:		list       ):
        SCREAMING_SNAKE_CASE_									=						[0] * n
        res.append(tuple(_SCREAMING_SNAKE_CASE       )       )

        SCREAMING_SNAKE_CASE_									=						0
        while i < n:
            if c[i] < i:
                if i % 2 == 0:
                    SCREAMING_SNAKE_CASE_							,			SCREAMING_SNAKE_CASE_									=						arr[i], arr[0]
                else:
                    SCREAMING_SNAKE_CASE_							,			SCREAMING_SNAKE_CASE_									=						arr[i], arr[c[i]]
                res.append(tuple(_SCREAMING_SNAKE_CASE       )       )
                c[i] += 1
                SCREAMING_SNAKE_CASE_									=						0
            else:
                SCREAMING_SNAKE_CASE_									=						0
                i += 1

    generate(len(_SCREAMING_SNAKE_CASE       ) ,   _SCREAMING_SNAKE_CASE       )
    return res


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





import pytest

import datasets


# Import fixture modules as plugins
UpperCamelCase__  :      Union[str, Any]			=    ["tests.fixtures.files", "tests.fixtures.hub", "tests.fixtures.fsspec"]


def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		Optional[Any] ,   _SCREAMING_SNAKE_CASE					:		Dict       ):





    """simple docstring"""


    for item in items:
        if any(marker in item.keywords for marker in ['integration', 'unit']       ):
            continue
        item.add_marker(pytest.mark.unit       )


def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		Optional[int]       ):





    """simple docstring"""


    config.addinivalue_line('markers' ,   'torchaudio_latest: mark test to run with torchaudio>=0.12'       )


@pytest.fixture(autouse=_SCREAMING_SNAKE_CASE       )
def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		Any ,   _SCREAMING_SNAKE_CASE					:		str       ):





    """simple docstring"""


    SCREAMING_SNAKE_CASE_									=						tmp_path_factory.getbasetemp() / 'cache'
    SCREAMING_SNAKE_CASE_									=						test_hf_cache_home / 'datasets'
    SCREAMING_SNAKE_CASE_									=						test_hf_cache_home / 'metrics'
    SCREAMING_SNAKE_CASE_									=						test_hf_cache_home / 'modules'
    monkeypatch.setattr('datasets.config.HF_DATASETS_CACHE' ,   str(_SCREAMING_SNAKE_CASE       )       )
    monkeypatch.setattr('datasets.config.HF_METRICS_CACHE' ,   str(_SCREAMING_SNAKE_CASE       )       )
    monkeypatch.setattr('datasets.config.HF_MODULES_CACHE' ,   str(_SCREAMING_SNAKE_CASE       )       )
    SCREAMING_SNAKE_CASE_									=						test_hf_datasets_cache / 'downloads'
    monkeypatch.setattr('datasets.config.DOWNLOADED_DATASETS_PATH' ,   str(_SCREAMING_SNAKE_CASE       )       )
    SCREAMING_SNAKE_CASE_									=						test_hf_datasets_cache / 'downloads' / 'extracted'
    monkeypatch.setattr('datasets.config.EXTRACTED_DATASETS_PATH' ,   str(_SCREAMING_SNAKE_CASE       )       )


@pytest.fixture(autouse=_SCREAMING_SNAKE_CASE ,   scope='session'       )
def 					_UpperCAmelCase       (  ):





    """simple docstring"""


    datasets.disable_progress_bar()


@pytest.fixture(autouse=_SCREAMING_SNAKE_CASE       )
def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		Any       ):





    """simple docstring"""


    monkeypatch.setattr('datasets.config.HF_UPDATE_DOWNLOAD_COUNTS' ,   _SCREAMING_SNAKE_CASE       )





@pytest.fixture
def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		Tuple       ):





    """simple docstring"""


    monkeypatch.setattr('sqlalchemy.util.deprecations.SILENCE_UBER_WARNING' ,   _SCREAMING_SNAKE_CASE       )


