/**
 * Given a list of color schemes and a tuple of wall colors, return the color scheme that matches the wall colors.
 * The color schemes are represented as tuples, where each tuple contains the possible colors for each wall.
 *
 * @param colorSchemes A list of tuples representing the color schemes. Each tuple contains the possible colors for each wall.
 * @param wallColors A tuple representing the colors of the walls.
 * @return The matching color scheme.
 */
fun findMatchingColorScheme(colorSchemes: List<List<String>>, wallColors: List<String>): List<String>? {

    for (colorScheme in colorSchemes) {
        if (wallColors.zip(colorScheme).all { (color, scheme) -> color == scheme }) {
            return colorScheme
        }
    }
    return null
}

// Example Usage

val colorSchemes = listOf(
    listOf("white", "white", "white"),  // Pure white color scheme
    listOf("white", "red", "white"),    // White walls with a red accent wall
    listOf("blue", "blue", "blue"),      // Blue color scheme
    listOf("blue", "white", "blue")      // Blue walls with a white accent wall
)

val wallColors = listOf("white", "red")
/**
 * Given a list of color schemes and a tuple of wall colors, return the color scheme that matches the wall colors.
 * The color schemes are represented as tuples, where each tuple contains the possible colors for each wall.
 *
 * @param colorSchemes A list of tuples representing the color schemes. Each tuple contains the possible colors for each wall.
 * @param wallColors A tuple representing the colors of the walls.
 * @return The matching color scheme.
 */
fun findMatchingColorScheme(colorSchemes: List<List<String>>, wallColors: List<String>): List<String>? {
/**
 * Given a list of color schemes and a tuple of wall colors, return the color scheme that matches the wall colors.
 * The color schemes are represented as tuples, where each tuple contains the possible colors for each wall.
 *
 * @param colorSchemes A list of tuples representing the color schemes. Each tuple contains the possible colors for each wall.
 * @param wallColors A tuple representing the colors of the walls.
 * @return The matching color scheme.
 */
fun findMatchingColorScheme(colorSchemes: List<List<String>>, wallColors: List<String>): List<String>? {

    for (colorScheme in colorSchemes) {
        if (wallColors.zip(colorScheme).all { (color, scheme) -> color == scheme }) {
            return colorScheme
        }
    }
    return null
}

// Example Usage

val colorSchemes = listOf(
    listOf("white", "white", "white"),  // Pure white color scheme
    listOf("white", "red", "white"),    // White walls with a red accent wall
    listOf("blue", "blue", "blue"),      // Blue color scheme
    listOf("blue", "white", "blue")      // Blue walls with a white accent wall
)

val wallColors = listOf("white", "red")