

'''simple docstring'''
import importlib
import os
import sys


# This is required to make the module import works (when the python process is running from the root of the repo)
sys.path.append(""".""")


def  a__       (    _SCREAMING_SNAKE_CASE   :       Dict				)     ->					Optional[Any]:


	"""simple docstring"""





	UpperCAmelCase_     :      Dict						=  test_file.split(os.path.sep				)
	if components[0:2] != ["tests", "models"]:
		raise ValueError(
		    "`test_file` should start with `tests/models/` (with `/` being the OS specific path separator). Got "
		    F'''{test_file} instead.'''				)
	UpperCAmelCase_     :      Union[str, Any]						=  components[-1]
	if not test_fn.endswith("py"				):
		raise ValueError(F'''`test_file` should be a python file. Got {test_fn} instead.'''				)
	if not test_fn.startswith("test_modeling_"				):
		raise ValueError(
		    F'''`test_file` should point to a file name of the form `test_modeling_*.py`. Got {test_fn} instead.'''				)

	UpperCAmelCase_     :      Tuple						=  components[:-1] + [test_fn.replace(".py"	,				""				)]
	UpperCAmelCase_     :      Optional[Any]						=  ".".join(UpperCamelCase__				)

	return test_module_path


def  a__       (    _SCREAMING_SNAKE_CASE   :       int				)     ->					List[str]:


	"""simple docstring"""





	UpperCAmelCase_     :      Optional[int]						=  get_module_path(UpperCamelCase__				)
	UpperCAmelCase_     :      Optional[int]						=  importlib.import_module(UpperCamelCase__				)

	return test_module


def  a__       (    _SCREAMING_SNAKE_CASE   :       Tuple				)     ->					List[str]:


	"""simple docstring"""





	UpperCAmelCase_     :      Union[str, Any]						=  []
	UpperCAmelCase_     :      List[Any]						=  get_test_module(UpperCamelCase__				)
	for attr in dir(UpperCamelCase__				):
		if attr.endswith("ModelTester"				):
			tester_classes.append(getattr(UpperCamelCase__	,				UpperCamelCase__				)				)

    # sort with class names
	return sorted(UpperCamelCase__	,				key=lambda _SCREAMING_SNAKE_CASE				: x.__name__				)


def  a__       (    _SCREAMING_SNAKE_CASE   :       List[Any]				)     ->					Union[str, Any]:


	"""simple docstring"""





	UpperCAmelCase_     :      Optional[int]						=  []
	UpperCAmelCase_     :      List[Any]						=  get_test_module(UpperCamelCase__				)
	for attr in dir(UpperCamelCase__				):
		UpperCAmelCase_     :      Optional[int]						=  getattr(UpperCamelCase__	,				UpperCamelCase__				)
		# (TF/Flax)ModelTesterMixin is also an attribute in specific model test module. Let's exclude them by checking
		# `all_model_classes` is not empty (which also excludes other special classes).
		UpperCAmelCase_     :      List[str]						=  getattr(UpperCamelCase__	,				"all_model_classes"	,				[]				)
		if len(UpperCamelCase__				) > 0:
			test_classes.append(UpperCamelCase__				)

    # sort with class names
	return sorted(UpperCamelCase__	,				key=lambda _SCREAMING_SNAKE_CASE				: x.__name__				)


def  a__       (    _SCREAMING_SNAKE_CASE   :       str				)     ->					int:


	"""simple docstring"""





	UpperCAmelCase_     :      Dict						=  get_test_classes(UpperCamelCase__				)
	UpperCAmelCase_     :      str						=  set()
	for test_class in test_classes:
		model_classes.update(test_class.all_model_classes				)

	# sort with class names
	return sorted(UpperCamelCase__	,				key=lambda _SCREAMING_SNAKE_CASE				: x.__name__				)


def  a__       (    _SCREAMING_SNAKE_CASE   :       Any				)     ->					Union[str, Any]:


	"""simple docstring"""





	UpperCAmelCase_     :      int						=  test_class()
	if hasattr(UpperCamelCase__	,				"setUp"				):
		test.setUp()

	UpperCAmelCase_     :      List[str]						=  None
	if hasattr(UpperCamelCase__	,				"model_tester"				):
		# `(TF/Flax)ModelTesterMixin` has this attribute default to `None`. Let's skip this case.
		if test.model_tester is not None:
			UpperCAmelCase_     :      Optional[Any]						=  test.model_tester.__class__

	return model_tester


def  a__       (    _SCREAMING_SNAKE_CASE   :       Dict	,				_SCREAMING_SNAKE_CASE   :       int				)     ->					Tuple:


	"""simple docstring"""





	UpperCAmelCase_     :      Dict						=  get_test_classes(UpperCamelCase__				)

	UpperCAmelCase_     :      Tuple						=  []
	for test_class in test_classes:
		if model_class in test_class.all_model_classes:
			target_test_classes.append(UpperCamelCase__				)

    # sort with class names
	return sorted(UpperCamelCase__	,				key=lambda _SCREAMING_SNAKE_CASE				: x.__name__				)


def  a__       (    _SCREAMING_SNAKE_CASE   :       Tuple	,				_SCREAMING_SNAKE_CASE   :       Any				)     ->					Tuple:


	"""simple docstring"""





	UpperCAmelCase_     :      Union[str, Any]						=  get_test_classes_for_model(UpperCamelCase__	,				UpperCamelCase__				)

	UpperCAmelCase_     :      Any						=  []
	for test_class in test_classes:
		UpperCAmelCase_     :      Union[str, Any]						=  get_model_tester_from_test_class(UpperCamelCase__				)
		if tester_class is not None:
			tester_classes.append(UpperCamelCase__				)

    # sort with class names
	return sorted(UpperCamelCase__	,				key=lambda _SCREAMING_SNAKE_CASE				: x.__name__				)


def  a__       (    _SCREAMING_SNAKE_CASE   :       int				)     ->					Tuple:


	"""simple docstring"""





	UpperCAmelCase_     :      Tuple						=  get_test_classes(UpperCamelCase__				)
	UpperCAmelCase_     :      int						=  {test_class: get_model_tester_from_test_class(UpperCamelCase__				) for test_class in test_classes}
	return test_tester_mapping


def  a__       (    _SCREAMING_SNAKE_CASE   :       str				)     ->					Optional[int]:


	"""simple docstring"""





	UpperCAmelCase_     :      Tuple						=  get_model_classes(UpperCamelCase__				)
	UpperCAmelCase_     :      int						=  {
	    model_class: get_test_classes_for_model(UpperCamelCase__	,				UpperCamelCase__				) for model_class in model_classes
	}
	return model_test_mapping


def  a__       (    _SCREAMING_SNAKE_CASE   :       Optional[int]				)     ->					List[Any]:


	"""simple docstring"""





	UpperCAmelCase_     :      Optional[int]						=  get_model_classes(UpperCamelCase__				)
	UpperCAmelCase_     :      Optional[int]						=  {
	    model_class: get_tester_classes_for_model(UpperCamelCase__	,				UpperCamelCase__				) for model_class in model_classes
	}
	return model_to_tester_mapping





def  a__       (    _SCREAMING_SNAKE_CASE   :       Tuple				)     ->					Any:


	"""simple docstring"""





	if isinstance(UpperCamelCase__	,				UpperCamelCase__				):
		return o
	elif isinstance(UpperCamelCase__	,				UpperCamelCase__				):
		return o.__name__
	elif isinstance(UpperCamelCase__	,				(list, tuple)				):
		return [to_json(UpperCamelCase__				) for x in o]
	elif isinstance(UpperCamelCase__	,				UpperCamelCase__				):
		return {to_json(UpperCamelCase__				): to_json(UpperCamelCase__				) for k, v in o.items()}
	else:
		return o





'''simple docstring'''


def    lowerCAmelCase       (		UpperCamelCase__					: list							):


	"""simple docstring"""
	__UpperCAmelCase      					=      False
	while is_sorted is False:  # Until all the indices are traversed keep looping
		__UpperCAmelCase      					=      True
		for i in range(0     ,       len(UpperCamelCase__							) - 1     ,       2							):  # iterating over all even indices
			if input_list[i] > input_list[i + 1]:
				__UpperCAmelCase					,      __UpperCAmelCase      					=      input_list[i + 1], input_list[i]
				# swapping if elements not in order
				__UpperCAmelCase      					=      False

		for i in range(1     ,       len(UpperCamelCase__							) - 1     ,       2							):  # iterating over all odd indices
			if input_list[i] > input_list[i + 1]:
				__UpperCAmelCase					,      __UpperCAmelCase      					=      input_list[i + 1], input_list[i]
				# swapping if elements not in order
				__UpperCAmelCase      					=      False
	return input_list


if __name__ == "__main__":
					print("Enter list to be sorted")
					__lowerCAmelCase						:							List[str]    							=						[int(x) for x in input().split()]
					# inputing elements of the list in one line
					__lowerCAmelCase						:							Dict    							=						odd_even_sort(input_list)
					print("The sorted list is")
					print(sorted_list)
