/**
 * This function takes in two sets of carpentry operations and returns the intersection of them.
 * Each set contains nested lists, where each nested list represents a sequence of operations.
 *
 * @param setOne The first set of carpentry operations.
 * @param setTwo The second set of carpentry operations.
 * @return The intersection of the two sets of carpentry operations.
 */
fun calculateCarpentryOperations(setOne: List<List<String>>, setTwo: List<List<String>>): List<List<String>> {

    val setIntersection = mutableListOf<List<String>>()

    // Iterate over each sequence of operations in setOne
    for (operationsOne in setOne) {
        // Iterate over each sequence of operations in setTwo
        for (operationsTwo in setTwo) {
            // Check if the current sequence of operations in setOne is equal to the current sequence of operations in setTwo
            if (operationsOne == operationsTwo) {
                // Append the common sequence of operations to the setIntersection
                setIntersection.add(operationsOne)
            }
        }
    }

    return setIntersection
}
/**
 * This function takes in two sets of carpentry operations and returns the intersection of them.
 * Each set contains nested lists, where each nested list represents a sequence of operations.
 *
 * @param setOne The first set of carpentry operations.
 * @param setTwo The second set of carpentry operations.
 * @return The intersection of the two sets of carpentry operations.
 */
fun calculateCarpentryOperations(setOne: List<List<String>>, setTwo: List<List<String>>): List<List<String>> {
/**
 * This function takes in two sets of carpentry operations and returns the intersection of them.
 * Each set contains nested lists, where each nested list represents a sequence of operations.
 *
 * @param setOne The first set of carpentry operations.
 * @param setTwo The second set of carpentry operations.
 * @return The intersection of the two sets of carpentry operations.
 */
fun calculateCarpentryOperations(setOne: List<List<String>>, setTwo: List<List<String>>): List<List<String>> {

    val setIntersection = mutableListOf<List<String>>()

    // Iterate over each sequence of operations in setOne
    for (operationsOne in setOne) {
        // Iterate over each sequence of operations in setTwo
        for (operationsTwo in setTwo) {
            // Check if the current sequence of operations in setOne is equal to the current sequence of operations in setTwo
            if (operationsOne == operationsTwo) {
                // Append the common sequence of operations to the setIntersection
                setIntersection.add(operationsOne)
            }
        }
    }

    return setIntersection
}