


"""simple docstring"""


from __future__ import annotations

from collections.abc import Callable

A	:  Any            =     list[list[float | int]]


def _lowerCamelCase      (						_UpperCamelCase       ,					_UpperCamelCase ):

			'''simple docstring'''




			__lowerCAmelCase							       =     len(_UpperCamelCase )
			__lowerCAmelCase							       =     [[0 for _ in range(size + 1 )] for _ in range(_UpperCamelCase )]
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42

			for row in range(_UpperCamelCase ):
						for col in range(_UpperCamelCase ):
									__lowerCAmelCase							       =     matrix[row][col]

						__lowerCAmelCase							       =     vector[row][0]

			__lowerCAmelCase							       =     0
			__lowerCAmelCase							       =     0
			while row < size and col < size:
						# pivoting
						__lowerCAmelCase							       =     max((abs(augmented[rowa][col] ), rowa) for rowa in range(_UpperCamelCase       ,					_UpperCamelCase ) )[
						    1
						]
						if augmented[pivot_row][col] == 0:
									col += 1
									continue
						else:
									__lowerCAmelCase       ,      __lowerCAmelCase							       =     augmented[pivot_row], augmented[row]

						for rowa in range(row + 1       ,					_UpperCamelCase ):
									__lowerCAmelCase							       =     augmented[rowa][col] / augmented[row][col]
									__lowerCAmelCase							       =     0
									for cola in range(col + 1       ,					size + 1 ):
												augmented[rowa][cola] -= augmented[row][cola] * ratio

						row += 1
						col += 1

			# back substitution
			for col in range(1       ,					_UpperCamelCase ):
						for row in range(_UpperCamelCase ):
									__lowerCAmelCase							       =     augmented[row][col] / augmented[col][col]
									for cola in range(_UpperCamelCase       ,					size + 1 ):
												augmented[row][cola] -= augmented[col][cola] * ratio

    # round to get rid of numbers like 2.000000000000004
			return [
			    [round(augmented[row][size] / augmented[row][row]       ,					10 )] for row in range(_UpperCamelCase )
			]


def _lowerCamelCase      (						_UpperCamelCase ):

			'''simple docstring'''




			__lowerCAmelCase							       =     len(_UpperCamelCase )
			__lowerCAmelCase							       =     [[0 for _ in range(_UpperCamelCase )] for _ in range(_UpperCamelCase )]
			__lowerCAmelCase							       =     [[0] for _ in range(_UpperCamelCase )]
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42

			for x_val, y_val in enumerate(_UpperCamelCase ):
						for col in range(_UpperCamelCase ):
									__lowerCAmelCase							       =     (x_val + 1) ** (size - col - 1)
						__lowerCAmelCase							       =     y_val

			__lowerCAmelCase							       =     solve(_UpperCamelCase       ,					_UpperCamelCase )

			def interpolated_func(_UpperCamelCase ) -> int:
						return sum(
						    round(coeffs[x_val][0] ) * (var ** (size - x_val - 1))
						    for x_val in range(_UpperCamelCase ) )

			return interpolated_func


def _lowerCamelCase      (						_UpperCamelCase ):

			'''simple docstring'''




			return (
			    1
			    - variable
			    + variable**2
			    - variable**3
			    + variable**4
			    - variable**5
			    + variable**6
			    - variable**7
			    + variable**8
			    - variable**9
			    + variable**10
			)


def _lowerCamelCase      (						_UpperCamelCase = question_function       ,					_UpperCamelCase = 10 ):

			'''simple docstring'''




			__lowerCAmelCase							       =     [func(_UpperCamelCase ) for x_val in range(1       ,					order + 1 )]

			__lowerCAmelCase							       =     [
			    interpolate(data_points[:max_coeff] ) for max_coeff in range(1       ,					order + 1 )
			]

			__lowerCAmelCase							       =     0
			__lowerCAmelCase							       =     42
			__lowerCAmelCase							       =     42

			for poly in polynomials:
						__lowerCAmelCase							       =     1
						while func(_UpperCamelCase ) == poly(_UpperCamelCase ):
									x_val += 1

						ret += poly(_UpperCamelCase )

			return ret


if __name__ == "__main__":
	print(f'''{solution() = }''')








"""simple docstring"""


def _lowerCamelCase      (						_UpperCamelCase ):

			'''simple docstring'''




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

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


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




