/**
 * This function checks if the firefighter's positions are safe or not based on the given building map.
 *
 * @param firefighterPositions A list of tuples representing the positions of firefighters.
 * @param buildingMap A 2-dimensional list representing the building map where 'F' indicates a flammable location.
 * @return True if all firefighter positions are safe, False otherwise.
 */
fun isSafe(firefighterPositions: List<Pair<Int, Int>>, buildingMap: List<List<Char>>): Boolean {

    for ((x, y) in firefighterPositions) {
        if (buildingMap[x][y] == 'F') {
            return false
        }
    }
    return true
}
/**
 * This function checks if the firefighter's positions are safe or not based on the given building map.
 *
 * @param firefighterPositions A list of tuples representing the positions of firefighters.
 * @param buildingMap A 2-dimensional list representing the building map where 'F' indicates a flammable location.
 * @return True if all firefighter positions are safe, False otherwise.
 */
fun isSafe(firefighterPositions: List<Pair<Int, Int>>, buildingMap: List<List<Char>>): Boolean {
/**
 * This function checks if the firefighter's positions are safe or not based on the given building map.
 *
 * @param firefighterPositions A list of tuples representing the positions of firefighters.
 * @param buildingMap A 2-dimensional list representing the building map where 'F' indicates a flammable location.
 * @return True if all firefighter positions are safe, False otherwise.
 */
fun isSafe(firefighterPositions: List<Pair<Int, Int>>, buildingMap: List<List<Char>>): Boolean {

    for ((x, y) in firefighterPositions) {
        if (buildingMap[x][y] == 'F') {
            return false
        }
    }
    return true
}