






import numpy as np
from cva import destroyAllWindows, imread, imshow, waitKey





class       __a  :







	def __init__(		self :       Optional[int]							,       SCREAMING_SNAKE_CASE :       List[str]							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int						):


						'''simple docstring'''






						if dst_width < 0 or dst_height < 0:
											raise ValueError("Destination width/height should be > 0"						)

						UpperCamelCase__      :       Union[str, Any]	    =  img
						UpperCamelCase__      :       Dict	    =  img.shape[1]
						UpperCamelCase__      :       int	    =  img.shape[0]
						UpperCamelCase__      :       Union[str, Any]	    =  dst_width
						UpperCamelCase__      :       Any	    =  dst_height

						UpperCamelCase__      :       str	    =  self.src_w / self.dst_w
						UpperCamelCase__      :       Optional[int]	    =  self.src_h / self.dst_h

						UpperCamelCase__      :       int	    =  (
						    np.ones((self.dst_h, self.dst_w, 3)							,       np.uinta						) * 2_55
						)







	def  __lowercase (		self :       Any						):


						'''simple docstring'''






						for i in range(self.dst_h						):
											for j in range(self.dst_w						):
																UpperCamelCase__      :       Any	    =  self.img[self.get_y(SCREAMING_SNAKE_CASE						)][self.get_x(SCREAMING_SNAKE_CASE						)]







	def  __lowercase (		self :       List[Any]							,       SCREAMING_SNAKE_CASE :       int						):


						'''simple docstring'''






						return int(self.ratio_x * x						)







	def  __lowercase (		self :       Union[str, Any]							,       SCREAMING_SNAKE_CASE :       int						):


						'''simple docstring'''






						return int(self.ratio_y * y						)


if __name__ == "__main__":
	lowerCamelCase     :							str    =800, 600
	lowerCamelCase     :							Optional[int]    =imread('''image_data/lena.jpg''', 1)
	lowerCamelCase     :							str    =NearestNeighbour(im, dst_w, dst_h)
	n.process()

	imshow(
	    F"""Image resized from: {im.shape[1]}x{im.shape[0]} to {dst_w}x{dst_h}""", n.output
	)
	waitKey(0)
	destroyAllWindows()







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

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


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