/**
 * Given two lists of colors, find the colors that are present in both lists.
 *
 * @param colorList1 A list of colors.
 * @param colorList2 Another list of colors.
 * @return A list of colors that appear in both input lists.
 */
fun findCommonColors(colorList1: List<String>, colorList2: List<String>): List<String> {

    val commonColors = mutableListOf<String>()

    // Iterate over each color in colorList1
    for (color1 in colorList1) {
        // Check if the color is in colorList2
        if (colorList2.contains(color1)) {
            // Check if the color is not already in commonColors
            if (!commonColors.contains(color1)) {
                commonColors.add(color1)
            }
        }
    }

    return commonColors
}
/**
 * Given two lists of colors, find the colors that are present in both lists.
 *
 * @param colorList1 A list of colors.
 * @param colorList2 Another list of colors.
 * @return A list of colors that appear in both input lists.
 */
fun findCommonColors(colorList1: List<String>, colorList2: List<String>): List<String> {
/**
 * Given two lists of colors, find the colors that are present in both lists.
 *
 * @param colorList1 A list of colors.
 * @param colorList2 Another list of colors.
 * @return A list of colors that appear in both input lists.
 */
fun findCommonColors(colorList1: List<String>, colorList2: List<String>): List<String> {

    val commonColors = mutableListOf<String>()

    // Iterate over each color in colorList1
    for (color1 in colorList1) {
        // Check if the color is in colorList2
        if (colorList2.contains(color1)) {
            // Check if the color is not already in commonColors
            if (!commonColors.contains(color1)) {
                commonColors.add(color1)
            }
        }
    }

    return commonColors
}