'''simple docstring'''

from cva import destroyAllWindows, imread, imshow, waitKey



def lowerCamelCase__						(       A_       ,			A_       ):
 UpperCAmelCase_       ,       UpperCAmelCase_				       =					img.shape[0], img.shape[1]

 def to_grayscale(A_       ,			A_       ,			A_       ):
  return 0.2126 * red + 0.587 * green + 0.114 * blue

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

 for i in range(A_       ):
  for j in range(A_       ):
   UpperCAmelCase_				       =					int(to_grayscale(*img[i][j]       )       )
   UpperCAmelCase_				       =					[
       normalize(A_       ),
       normalize(greyscale + factor       ),
       normalize(greyscale + 2 * factor       ),
   ]

 return img


if __name__ == "__main__":
      # read original image
      __snake_case       :   Dict  		=    {
          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 lowerCamelCase__						(       A_       ):
 UpperCAmelCase_				       =					len(A_       )
 for _ in range(
     0       ,			int(((no_of_elements - 1) / 2) + 1       )       ):  # we don't need to traverse to end of list as
  for j in range(0       ,			no_of_elements - 1       ):
   if (
       lst[j + 1] < lst[j]
   ):  # applying bubble sort algorithm from left to right (or forwards)
    UpperCAmelCase_				       =					lst[j + 1]
    UpperCAmelCase_				       =					lst[j]
    UpperCAmelCase_				       =					temp
   if (
       lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
   ):  # applying bubble sort algorithm from right to left (or backwards)
    UpperCAmelCase_				       =					lst[no_of_elements - 1 - j]
    UpperCAmelCase_				       =					lst[no_of_elements - 2 - j]
    UpperCAmelCase_				       =					temp
 return lst


if __name__ == "__main__":
      print('''enter the list to be sorted''')
      __snake_case       :   List[str]  		=    [int(x) for x in input().split()]  # inputing elements of the list in one line
      __snake_case       :   Optional[int]  		=    double_sort(lst)
      print('''the sorted list is''')
      print(sorted_lst)
