/**
 * Given a list of color palettes and a new color,
 * add the new color to each palette.
 *
 * Example:
 * addColorPalette(listOf("red", "blue", "green"), "yellow")
 * Output: ["red", "blue", "green", "yellow"], ["red", "blue", "green", "yellow"], ["red", "blue", "green", "yellow"]
 */
fun addColorPalette(palette: List<MutableList<String>>, newColor: String): List<MutableList<String>> {

    // Iterate over each palette in the list
    for (i in palette.indices) {
        // Append the new color to each palette
        palette[i].add(newColor)
    }
    return palette
}
/**
 * Given a list of color palettes and a new color,
 * add the new color to each palette.
 *
 * Example:
 * addColorPalette(listOf("red", "blue", "green"), "yellow")
 * Output: ["red", "blue", "green", "yellow"], ["red", "blue", "green", "yellow"], ["red", "blue", "green", "yellow"]
 */
fun addColorPalette(palette: List<MutableList<String>>, newColor: String): List<MutableList<String>> {
/**
 * Given a list of color palettes and a new color,
 * add the new color to each palette.
 *
 * Example:
 * addColorPalette(listOf("red", "blue", "green"), "yellow")
 * Output: ["red", "blue", "green", "yellow"], ["red", "blue", "green", "yellow"], ["red", "blue", "green", "yellow"]
 */
fun addColorPalette(palette: List<MutableList<String>>, newColor: String): List<MutableList<String>> {

    // Iterate over each palette in the list
    for (i in palette.indices) {
        // Append the new color to each palette
        palette[i].add(newColor)
    }
    return palette
}