/**
 * This function slices a specified portion of a photo and replaces it with a given value.
 *
 * @param photo A list representing the photo.
 * @param start The starting index of the slice.
 * @param end The ending index of the slice.
 * @param replacement The value to replace the sliced portion.
 * @return A modified photo with the sliced portion replaced.
 */
fun sliceAndReplace(photo: MutableList<String>, start: Int, end: Int, replacement: String): MutableList<String> {

    // Slicing the photo and replacing the sliced portion
    val slicedPhoto = photo.subList(0, start) + List(end - start) { replacement } + photo.subList(end, photo.size)
    
    return slicedPhoto.toMutableList()
}
/**
 * This function slices a specified portion of a photo and replaces it with a given value.
 *
 * @param photo A list representing the photo.
 * @param start The starting index of the slice.
 * @param end The ending index of the slice.
 * @param replacement The value to replace the sliced portion.
 * @return A modified photo with the sliced portion replaced.
 */
fun sliceAndReplace(photo: MutableList<String>, start: Int, end: Int, replacement: String): MutableList<String> {
/**
 * This function slices a specified portion of a photo and replaces it with a given value.
 *
 * @param photo A list representing the photo.
 * @param start The starting index of the slice.
 * @param end The ending index of the slice.
 * @param replacement The value to replace the sliced portion.
 * @return A modified photo with the sliced portion replaced.
 */
fun sliceAndReplace(photo: MutableList<String>, start: Int, end: Int, replacement: String): MutableList<String> {

    // Slicing the photo and replacing the sliced portion
    val slicedPhoto = photo.subList(0, start) + List(end - start) { replacement } + photo.subList(end, photo.size)
    
    return slicedPhoto.toMutableList()
}