"""simple docstring"""


from urllib.parse import quote

import pytest

from datasets.utils.hub import hf_hub_url





@pytest.mark.parametrize("repo_id"  ,       ["canonical_dataset_name", "org-name/dataset-name"]							)
@pytest.mark.parametrize("path"  ,       ["filename.csv", "filename with blanks.csv"]							)
@pytest.mark.parametrize("revision"  ,       [None, "v2"]							)
def      lowerCamelCase_					(   __lowerCAmelCase  ,       __lowerCAmelCase  ,       __lowerCAmelCase							)				->   Optional[int]:




						'''simple docstring'''



						lowerCamelCase__   =hf_hub_url(repo_id=__lowerCAmelCase  ,       path=__lowerCAmelCase  ,       revision=__lowerCAmelCase							)
						assert url == F'''https://huggingface.co/datasets/{repo_id}/resolve/{revision or 'main'}/{quote(__lowerCAmelCase							)}'''



"""simple docstring"""


def      lowerCamelCase_					(   __lowerCAmelCase							)				->   list:




						'''simple docstring'''



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

						lowerCamelCase__   =[]

						def generate(__lowerCAmelCase  ,       __lowerCAmelCase							):
												lowerCamelCase__   =[0] * n
												res.append(tuple(__lowerCAmelCase							)							)

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

						generate(len(__lowerCAmelCase							)  ,       __lowerCAmelCase							)
						return res


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


