






"""simple docstring"""
def        lowerCamelCase_  (						_lowerCamelCase			,   _lowerCamelCase				):
 lowerCamelCase__     :			int     				=						sorted(_lowerCamelCase			,   key=lambda _lowerCamelCase				: edge[2]				)

 lowerCamelCase__     :			str     				=						list(range(_lowerCamelCase				)				)

 def find_parent(_lowerCamelCase				):
  if i != parent[i]:
   lowerCamelCase__     :			Tuple     				=						find_parent(parent[i]				)
  return parent[i]

 lowerCamelCase__     :			Tuple     				=						0
 lowerCamelCase__     :			List[Any]     				=						[]

 for edge in edges:
  lowerCamelCase__     :			Dict     				=						find_parent(edge[0]				)
  lowerCamelCase__     :			List[Any]     				=						find_parent(edge[1]				)
  if parent_a != parent_b:
   minimum_spanning_tree_cost += edge[2]
   minimum_spanning_tree.append(_lowerCamelCase				)
   lowerCamelCase__     :			List[str]     				=						parent_b

 return minimum_spanning_tree


if __name__ == "__main__":  # pragma: no cover
      A_,       A_			: Union[str, Any]				=			list(map(int, input().strip().split()))
      A_			: Dict				=			[]

      for _ in range(num_edges):
            A_,       A_,       A_			: List[str]				=			(int(x) for x in input().strip().split())
            edges.append((nodea, nodea, cost))

      kruskal(num_nodes, edges)









"""simple docstring"""
from cva import destroyAllWindows, imread, imshow, waitKey






def        lowerCamelCase_  (						_lowerCamelCase			,   _lowerCamelCase				):
 lowerCamelCase__				,     lowerCamelCase__     :			Optional[Any]     				=						img.shape[0], img.shape[1]

 def to_grayscale(_lowerCamelCase			,   _lowerCamelCase			,   _lowerCamelCase				):
  return 0.2_126 * red + 0.587 * green + 0.114 * blue

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

 for i in range(_lowerCamelCase				):
  for j in range(_lowerCamelCase				):
   lowerCamelCase__     :			List[Any]     				=						int(to_grayscale(*img[i][j]				)				)
   lowerCamelCase__     :			Optional[int]     				=						[
       normalize(_lowerCamelCase				),
       normalize(greyscale + factor				),
       normalize(greyscale + 2 * factor				),
   ]

 return img


if __name__ == "__main__":
      # read original image
      A_			: List[str]				=			{
          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()

