/**
 * This function takes in a map of customers and their products.
 * It returns a map containing the intersection of products between customers.
 */
fun getCustomerProducts(customers: Map<String, List<String>>): Map<Pair<String, String>, List<String>> {

    val intersection = mutableMapOf<Pair<String, String>, List<String>>()

    // Iterate over each customer
    for ((customer1, products1) in customers) {
        // Iterate over other customers
        for ((customer2, products2) in customers) {
            // Skip the same customer
            if (customer1 == customer2) {
                continue
            }

            // Find common products between two customers
            val commonProducts = products1.filter { it in products2 }

            // Update the intersection map
            if (commonProducts.isNotEmpty()) {
                intersection[Pair(customer1, customer2)] = commonProducts
            }
        }
    }

    return intersection
}

// Example usage
/**
 * This function takes in a map of customers and their products.
 * It returns a map containing the intersection of products between customers.
 */
fun getCustomerProducts(customers: Map<String, List<String>>): Map<Pair<String, String>, List<String>> {
/**
 * This function takes in a map of customers and their products.
 * It returns a map containing the intersection of products between customers.
 */
fun getCustomerProducts(customers: Map<String, List<String>>): Map<Pair<String, String>, List<String>> {

    val intersection = mutableMapOf<Pair<String, String>, List<String>>()

    // Iterate over each customer
    for ((customer1, products1) in customers) {
        // Iterate over other customers
        for ((customer2, products2) in customers) {
            // Skip the same customer
            if (customer1 == customer2) {
                continue
            }

            // Find common products between two customers
            val commonProducts = products1.filter { it in products2 }

            // Update the intersection map
            if (commonProducts.isNotEmpty()) {
                intersection[Pair(customer1, customer2)] = commonProducts
            }
        }
    }

    return intersection
}

// Example usage