



'''simple docstring'''







from cva import destroyAllWindows, imread, imshow, waitKey







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE ,		SCREAMING_SNAKE_CASE     ):
		SCREAMING_SNAKE_CASE_						,		SCREAMING_SNAKE_CASE_						:Dict										=      img.shape[0], img.shape[1]

		def to_grayscale(SCREAMING_SNAKE_CASE ,		SCREAMING_SNAKE_CASE ,		SCREAMING_SNAKE_CASE     ):
				return 0.2_1_2_6 * red + 0.5_8_7 * green + 0.1_1_4 * blue

		def normalize(SCREAMING_SNAKE_CASE     ):
				return min(SCREAMING_SNAKE_CASE ,		255     )

		for i in range(SCREAMING_SNAKE_CASE     ):
				for j in range(SCREAMING_SNAKE_CASE     ):
						SCREAMING_SNAKE_CASE_						:Dict										=      int(to_grayscale(*img[i][j]     )     )
						SCREAMING_SNAKE_CASE_						:Optional[Any]										=      [
						    normalize(SCREAMING_SNAKE_CASE     ),
						    normalize(greyscale + factor     ),
						    normalize(greyscale + 2 * factor     ),
						]

		return img


if __name__ == "__main__":
							# read original image
							SCREAMING_SNAKE_CASE__     : Any				=   {
							    percentage: imread("""image_data/lena.jpg""", 1) for percentage in (10, 20, 30, 40)
							}

							for percentage, img in images.items():
														make_sepia(img, percentage)

							for percentage, img in images.items():
														imshow(f"""Original image with sepia (factor: {percentage})""", img)

							waitKey(0)
							destroyAllWindows()





'''simple docstring'''







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		for i, _ in enumerate(SCREAMING_SNAKE_CASE     ):
				if (i % 2 == 1) == (nums[i - 1] > nums[i]):
						SCREAMING_SNAKE_CASE_						,		SCREAMING_SNAKE_CASE_						:Dict										=      nums[i], nums[i - 1]

		return nums


if __name__ == "__main__":
							print("""Enter the array elements:""")
							SCREAMING_SNAKE_CASE__     : Tuple				=   list(map(int, input().split()))
							print("""The unsorted array is:""")
							print(array)
							print("""Array after Wiggle sort:""")
							print(wiggle_sort(array))
