/**
 * This function takes a list of outfits and prints the ones that are suitable for the given weather conditions.
 *
 * @param outfits A list of outfits to be checked.
 */
fun printOutfits(outfits: List<String>) {

    val weatherConditions = mapOf(
        "sunny" to listOf("sunhat", "sunglasses", "sundress", "sandals"),
        "rainy" to listOf("umbrella", "raincoat", "boots"),
        "cloudy" to listOf("long-sleeved shirt", "jeans", "sneakers"),
        "windy" to listOf("windbreaker", "trousers", "loafers")
    )

    print("Enter the current weather conditions (sunny/rainy/cloudy/windy): ")
    val currentWeather = readLine()

    val suitableOutfits = mutableListOf<String>()

    if (currentWeather !in weatherConditions) {
        println("Invalid weather condition, please try again.")
        return
    }

    // Loop through each outfit in the list and check if it is suitable for the current weather
    for (outfit in outfits) {
        var suitableOutfit = ""

        // Use a nested loop to iterate through each weather condition and find a suitable outfit
        for ((condition, clothes) in weatherConditions) {
            if (condition == currentWeather && outfit in clothes) {
                suitableOutfit = outfit
                break
            }
        }

        if (suitableOutfit.isNotEmpty()) {
            suitableOutfits.add(suitableOutfit)
        }
    }

    println("Suitable outfits for $currentWeather weather: $suitableOutfits")
}
/**
 * This function takes a list of outfits and prints the ones that are suitable for the given weather conditions.
 *
 * @param outfits A list of outfits to be checked.
 */
fun printOutfits(outfits: List<String>) {
/**
 * This function takes a list of outfits and prints the ones that are suitable for the given weather conditions.
 *
 * @param outfits A list of outfits to be checked.
 */
fun printOutfits(outfits: List<String>) {

    val weatherConditions = mapOf(
        "sunny" to listOf("sunhat", "sunglasses", "sundress", "sandals"),
        "rainy" to listOf("umbrella", "raincoat", "boots"),
        "cloudy" to listOf("long-sleeved shirt", "jeans", "sneakers"),
        "windy" to listOf("windbreaker", "trousers", "loafers")
    )

    print("Enter the current weather conditions (sunny/rainy/cloudy/windy): ")
    val currentWeather = readLine()

    val suitableOutfits = mutableListOf<String>()

    if (currentWeather !in weatherConditions) {
        println("Invalid weather condition, please try again.")
        return
    }

    // Loop through each outfit in the list and check if it is suitable for the current weather
    for (outfit in outfits) {
        var suitableOutfit = ""

        // Use a nested loop to iterate through each weather condition and find a suitable outfit
        for ((condition, clothes) in weatherConditions) {
            if (condition == currentWeather && outfit in clothes) {
                suitableOutfit = outfit
                break
            }
        }

        if (suitableOutfit.isNotEmpty()) {
            suitableOutfits.add(suitableOutfit)
        }
    }

    println("Suitable outfits for $currentWeather weather: $suitableOutfits")
}