

"""simple docstring"""




def  __lowerCamelCase     (			UpperCamelCase__       ,							UpperCamelCase__				):







							'''simple docstring'''






							snake_case_          =   [1]
							for i in range(2       ,							UpperCamelCase__				):
														factorials.append(factorials[-1] * i				)
							assert 0 <= k < factorials[-1] * n, "k out of bounds"

							snake_case_          =   []
							snake_case_          =   list(range(UpperCamelCase__				)				)

							# Find permutation
							while factorials:
														snake_case_          =   factorials.pop()
														snake_case_    ,   snake_case_          =   divmod(UpperCamelCase__       ,							UpperCamelCase__				)
														permutation.append(elements[number]				)
														elements.remove(elements[number]				)
							permutation.append(elements[0]				)

							return permutation


if __name__ == "__main__":
					import doctest

					doctest.testmod()







def  __lowerCamelCase     (			UpperCamelCase__				):







							'''simple docstring'''






							snake_case_          =   len(UpperCamelCase__				)
							for _ in range(UpperCamelCase__				):
														for i in range(_ % 2       ,							arr_size - 1       ,							2				):
																					if arr[i + 1] < arr[i]:
																												snake_case_    ,   snake_case_          =   arr[i + 1], arr[i]

							return arr


if __name__ == "__main__":
					_UpperCAmelCase		:       Dict						    =	list(range(10, 0, -1))
					print(F'''Original: {arr}. Sorted: {odd_even_transposition(arr)}''')




