/**
 * This function calculates the fuel consumption for each aircraft in a given flight data.
 *
 * @param flightData A dictionary containing aircraft information and corresponding flight data.
 * @return A dictionary with aircraft names as keys and the respective fuel consumption as values.
 */
fun calculateFuelConsumption(flightData: Map<String, Map<String, Int>>): Map<String, String> {

    val fuelConsumption = mutableMapOf<String, String>()

    for ((aircraft, data) in flightData) {
        if (data["altitude"]!! >= 35000 && data["airspeed"]!! >= 400) {
            if (data["fuel_flow"]!! <= 100) {
                fuelConsumption[aircraft] = "Low fuel consumption"
            } else {
                fuelConsumption[aircraft] = "High fuel consumption"
            }
        } else {
            fuelConsumption[aircraft] = "Insufficient altitude or airspeed"
        }
    }

    return fuelConsumption
}

// Example Flight Data
val flightData = mapOf(
    "Aircraft1" to mapOf(
        "altitude" to 38000,
        "airspeed" to 440,
        "fuel_flow" to 95
    ),
    "Aircraft2" to mapOf(
        "altitude" to 32000,
        "airspeed" to 360,
        "fuel_flow" to 110
    )
)
/**
 * This function calculates the fuel consumption for each aircraft in a given flight data.
 *
 * @param flightData A dictionary containing aircraft information and corresponding flight data.
 * @return A dictionary with aircraft names as keys and the respective fuel consumption as values.
 */
fun calculateFuelConsumption(flightData: Map<String, Map<String, Int>>): Map<String, String> {
/**
 * This function calculates the fuel consumption for each aircraft in a given flight data.
 *
 * @param flightData A dictionary containing aircraft information and corresponding flight data.
 * @return A dictionary with aircraft names as keys and the respective fuel consumption as values.
 */
fun calculateFuelConsumption(flightData: Map<String, Map<String, Int>>): Map<String, String> {

    val fuelConsumption = mutableMapOf<String, String>()

    for ((aircraft, data) in flightData) {
        if (data["altitude"]!! >= 35000 && data["airspeed"]!! >= 400) {
            if (data["fuel_flow"]!! <= 100) {
                fuelConsumption[aircraft] = "Low fuel consumption"
            } else {
                fuelConsumption[aircraft] = "High fuel consumption"
            }
        } else {
            fuelConsumption[aircraft] = "Insufficient altitude or airspeed"
        }
    }

    return fuelConsumption
}

// Example Flight Data
val flightData = mapOf(
    "Aircraft1" to mapOf(
        "altitude" to 38000,
        "airspeed" to 440,
        "fuel_flow" to 95
    ),
    "Aircraft2" to mapOf(
        "altitude" to 32000,
        "airspeed" to 360,
        "fuel_flow" to 110
    )
)