

from __future__ import annotations

from collections import Counter

def     __magic_name__       ( A							)			->		list[int]:
	snake_case							 =				[True] * n
	snake_case							 =				False
	snake_case							 =				False
	snake_case							 =				True

	for i in range(3					,   int(n**0.5 + 1							)					,   2							):
		snake_case							 =				i * 2
		while index < n:
			snake_case							 =				False
			snake_case							 =				index + i

	snake_case							 =				[2]

	for i in range(3					,   snake_case__					,   2							):
		if is_prime[i]:
			primes.append(snake_case__							)

	return primes

def     __magic_name__       ( A							)			->		list[list[int]]:
	snake_case							 =				str(snake_case__							)
	snake_case							 =				[]
	snake_case							 =				['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']

	for duplicate in Counter(snake_case__							) - Counter(set(snake_case__							)							):
		snake_case							 =				[int(number_str.replace(snake_case__					,   snake_case__							)							) for digit in digits]
		replacements.append(snake_case__							)

	return replacements

def     __magic_name__       ( A = 8							)			->		int:
	snake_case							 =				set()

	# Filter primes with less than 3 replaceable digits
	snake_case							 =				{
	    x for x in set(prime_sieve(1_0_0_0_0_0_0							)							) if len(str(snake_case__							)							) - len(set(str(snake_case__							)							)							) >= 3
	}

	for prime in primes:
		if prime in numbers_checked:
			continue

		snake_case							 =				digit_replacements(snake_case__							)

		for family in replacements:
			numbers_checked.update(snake_case__							)
			snake_case							 =				primes.intersection(snake_case__							)

			if len(snake_case__							) != family_length:
				continue

			return min(snake_case__							)

	return -1


if __name__ == "__main__":
						print(solution())








'''simple docstring'''

from cva import destroyAllWindows, imread, imshow, waitKey

def     __magic_name__       ( A					,   A							)			->		Union[str, Any]:
	snake_case , snake_case							 =				img.shape[0], img.shape[1]

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

	def normalize(A							):
		return min(A					,   2_5_5							)

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

	return img


if __name__ == "__main__":
						# read original image
						lowerCAmelCase_						   =			{
						    percentage: imread("image_data/lena.jpg", 1) for percentage in (1_0, 2_0, 3_0, 4_0)
						}

						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()





