/**
 * A police officer is trying to identify the criminals in a list of people.
 * The criminals are identified based on certain criteria. You need to complete
 * the code to determine the criminals by iterating over the list of people,
 * applying the necessary conditions, and returning the list of identified criminals.
 *
 * @param people A map containing the personal information of people.
 *               Each key is an identification number and the corresponding value
 *               is a triple containing the person's name, age, and criminal record.
 * @return The list of identification numbers of the identified criminals.
 */
fun findCriminals(people: Map<Int, Triple<String, Int, Boolean>>): List<Int> {

    val criminals = mutableListOf<Int>()

    // Iterate over the people map
    for ((idNum, personData) in people) {
        // Unpack the triple of person's name, age, and criminal record
        val (name, age, criminalRecord) = personData

        // Check if the person meets the conditions to be considered a criminal
        if (age >= 18 && criminalRecord) {
            // Add the identification number to the list of criminals
            criminals.add(idNum)
        }
    }

    return criminals
}
/**
 * A police officer is trying to identify the criminals in a list of people.
 * The criminals are identified based on certain criteria. You need to complete
 * the code to determine the criminals by iterating over the list of people,
 * applying the necessary conditions, and returning the list of identified criminals.
 *
 * @param people A map containing the personal information of people.
 *               Each key is an identification number and the corresponding value
 *               is a triple containing the person's name, age, and criminal record.
 * @return The list of identification numbers of the identified criminals.
 */
fun findCriminals(people: Map<Int, Triple<String, Int, Boolean>>): List<Int> {
/**
 * A police officer is trying to identify the criminals in a list of people.
 * The criminals are identified based on certain criteria. You need to complete
 * the code to determine the criminals by iterating over the list of people,
 * applying the necessary conditions, and returning the list of identified criminals.
 *
 * @param people A map containing the personal information of people.
 *               Each key is an identification number and the corresponding value
 *               is a triple containing the person's name, age, and criminal record.
 * @return The list of identification numbers of the identified criminals.
 */
fun findCriminals(people: Map<Int, Triple<String, Int, Boolean>>): List<Int> {

    val criminals = mutableListOf<Int>()

    // Iterate over the people map
    for ((idNum, personData) in people) {
        // Unpack the triple of person's name, age, and criminal record
        val (name, age, criminalRecord) = personData

        // Check if the person meets the conditions to be considered a criminal
        if (age >= 18 && criminalRecord) {
            // Add the identification number to the list of criminals
            criminals.add(idNum)
        }
    }

    return criminals
}