/**
 * Given a list of houses with their details, create a nested dictionary representing each house and its features.
 * Calculate the total cost of all the houses combined.
 */
fun architectPlan(houses: List<Map<String, Any>>): Pair<Map<String, Map<String, Any>>, Int> {

    var totalCost = 0
    val houseDict = mutableMapOf<String, Map<String, Any>>()

    houses.forEachIndexed { index, house ->
        // Generate a random ID for each house
        val houseId = "House${index + 1}"

        // Create a nested dictionary for each house
        houseDict[houseId] = mapOf(
            "Location" to house["Location"]!!,
            "Rooms" to house["Rooms"]!!,
            "Bathrooms" to house["Bathrooms"]!!,
            "Year Built" to house["Year Built"]!!,
            "Price" to house["Price"]!!
        )

        totalCost += house["Price"] as Int
    }

    return houseDict to totalCost
}
/**
 * Given a list of houses with their details, create a nested dictionary representing each house and its features.
 * Calculate the total cost of all the houses combined.
 */
fun architectPlan(houses: List<Map<String, Any>>): Pair<Map<String, Map<String, Any>>, Int> {
/**
 * Given a list of houses with their details, create a nested dictionary representing each house and its features.
 * Calculate the total cost of all the houses combined.
 */
fun architectPlan(houses: List<Map<String, Any>>): Pair<Map<String, Map<String, Any>>, Int> {

    var totalCost = 0
    val houseDict = mutableMapOf<String, Map<String, Any>>()

    houses.forEachIndexed { index, house ->
        // Generate a random ID for each house
        val houseId = "House${index + 1}"

        // Create a nested dictionary for each house
        houseDict[houseId] = mapOf(
            "Location" to house["Location"]!!,
            "Rooms" to house["Rooms"]!!,
            "Bathrooms" to house["Bathrooms"]!!,
            "Year Built" to house["Year Built"]!!,
            "Price" to house["Price"]!!
        )

        totalCost += house["Price"] as Int
    }

    return houseDict to totalCost
}