/**
 * Given a list of customers and a list of products,
 * this function creates marketing lists for each
 * customer with initial product recommendations.
 *
 * @param customers List of customer names
 * @param products List of product names
 * @return A dictionary with customer names as keys and
 * lists of initial product recommendations as values
 *
 * Example:
 * customers = listOf("John", "Emily", "Sophia")
 * products = listOf("TV", "Phone", "Laptop")
 * createMarketingLists(customers, products)
 * Output: mapOf("John" to listOf("TV", "Phone", "Laptop"),
 *               "Emily" to listOf("TV", "Phone", "Laptop"),
 *               "Sophia" to listOf("TV", "Phone", "Laptop"))
 */
fun createMarketingLists(customers: List<String>, products: List<String>): Map<String, List<String>> {

    val marketingLists = mutableMapOf<String, MutableList<String>>()

    for (customer in customers) {
        marketingLists[customer] = mutableListOf()
        for (product in products) {
            marketingLists[customer]?.add(product)
        }
    }

    return marketingLists.mapValues { it.value.toList() }
}
/**
 * Given a list of customers and a list of products,
 * this function creates marketing lists for each
 * customer with initial product recommendations.
 *
 * @param customers List of customer names
 * @param products List of product names
 * @return A dictionary with customer names as keys and
 * lists of initial product recommendations as values
 *
 * Example:
 * customers = listOf("John", "Emily", "Sophia")
 * products = listOf("TV", "Phone", "Laptop")
 * createMarketingLists(customers, products)
 * Output: mapOf("John" to listOf("TV", "Phone", "Laptop"),
 *               "Emily" to listOf("TV", "Phone", "Laptop"),
 *               "Sophia" to listOf("TV", "Phone", "Laptop"))
 */
fun createMarketingLists(customers: List<String>, products: List<String>): Map<String, List<String>> {
/**
 * Given a list of customers and a list of products,
 * this function creates marketing lists for each
 * customer with initial product recommendations.
 *
 * @param customers List of customer names
 * @param products List of product names
 * @return A dictionary with customer names as keys and
 * lists of initial product recommendations as values
 *
 * Example:
 * customers = listOf("John", "Emily", "Sophia")
 * products = listOf("TV", "Phone", "Laptop")
 * createMarketingLists(customers, products)
 * Output: mapOf("John" to listOf("TV", "Phone", "Laptop"),
 *               "Emily" to listOf("TV", "Phone", "Laptop"),
 *               "Sophia" to listOf("TV", "Phone", "Laptop"))
 */
fun createMarketingLists(customers: List<String>, products: List<String>): Map<String, List<String>> {

    val marketingLists = mutableMapOf<String, MutableList<String>>()

    for (customer in customers) {
        marketingLists[customer] = mutableListOf()
        for (product in products) {
            marketingLists[customer]?.add(product)
        }
    }

    return marketingLists.mapValues { it.value.toList() }
}