/**
 * Given a list of firefighters' names and a specific firefighter's name, return the rank of the firefighter.
 *
 * @param firefighters A list of firefighters' names
 * @param firefighterName The name of a specific firefighter
 * @return The rank of the firefighter, or 'Unknown' if the firefighter is not found
 */
fun findFirefighterRank(firefighters: List<String>, firefighterName: String): String {

    val ranks = listOf("Cadet", "Firefighter", "Lieutenant", "Captain", "Battalion Chief", "Assistant Chief", "Deputy Chief", "Fire Chief")

    for (rank in ranks) {
        if (rank.toLowerCase() in firefighterName.toLowerCase()) {
            return rank
        }
    }

    return "Unknown"
}
/**
 * Given a list of firefighters' names and a specific firefighter's name, return the rank of the firefighter.
 *
 * @param firefighters A list of firefighters' names
 * @param firefighterName The name of a specific firefighter
 * @return The rank of the firefighter, or 'Unknown' if the firefighter is not found
 */
fun findFirefighterRank(firefighters: List<String>, firefighterName: String): String {
/**
 * Given a list of firefighters' names and a specific firefighter's name, return the rank of the firefighter.
 *
 * @param firefighters A list of firefighters' names
 * @param firefighterName The name of a specific firefighter
 * @return The rank of the firefighter, or 'Unknown' if the firefighter is not found
 */
fun findFirefighterRank(firefighters: List<String>, firefighterName: String): String {

    val ranks = listOf("Cadet", "Firefighter", "Lieutenant", "Captain", "Battalion Chief", "Assistant Chief", "Deputy Chief", "Fire Chief")

    for (rank in ranks) {
        if (rank.toLowerCase() in firefighterName.toLowerCase()) {
            return rank
        }
    }

    return "Unknown"
}