/**
 * Given a list of colors and shapes, this function finds the intersection of nested logical operators and nested loops
 * using break and continue statements in order to determine the common color-shape pairs in the format (color, shape).
 */
fun graphicDesignerTask(colors: List<String>, shapes: List<String>): List<Pair<String, String>> {

    val result = mutableListOf<Pair<String, String>>()

    for (color in colors) {
        if (color == "red") {
            for (shape in shapes) {
                when (shape) {
                    "circle" -> {
                        result.add(color to shape)
                        continue
                    }
                    "square" -> {
                        result.add(color to shape)
                        break
                    }
                    else -> continue
                }
            }
        } else if (color == "blue") {
            for (shape in shapes) {
                when (shape) {
                    "circle" -> continue
                    "square" -> {
                        result.add(color to shape)
                        break
                    }
                    else -> {
                        result.add(color to shape)
                        continue
                    }
                }
            }
        } else {
            continue
        }
    }

    return result
}
/**
 * Given a list of colors and shapes, this function finds the intersection of nested logical operators and nested loops
 * using break and continue statements in order to determine the common color-shape pairs in the format (color, shape).
 */
fun graphicDesignerTask(colors: List<String>, shapes: List<String>): List<Pair<String, String>> {
/**
 * Given a list of colors and shapes, this function finds the intersection of nested logical operators and nested loops
 * using break and continue statements in order to determine the common color-shape pairs in the format (color, shape).
 */
fun graphicDesignerTask(colors: List<String>, shapes: List<String>): List<Pair<String, String>> {

    val result = mutableListOf<Pair<String, String>>()

    for (color in colors) {
        if (color == "red") {
            for (shape in shapes) {
                when (shape) {
                    "circle" -> {
                        result.add(color to shape)
                        continue
                    }
                    "square" -> {
                        result.add(color to shape)
                        break
                    }
                    else -> continue
                }
            }
        } else if (color == "blue") {
            for (shape in shapes) {
                when (shape) {
                    "circle" -> continue
                    "square" -> {
                        result.add(color to shape)
                        break
                    }
                    else -> {
                        result.add(color to shape)
                        continue
                    }
                }
            }
        } else {
            continue
        }
    }

    return result
}