/**
 * Given a list of police records, this function concatenates the information together.
 *
 * @param records A list containing the individual police records.
 * @return A string containing the concatenated police records.
 */
fun concatenatePoliceRecords(records: List<Map<String, Any>>): String {

    // Initialize an empty string to store the concatenated records
    var concatenatedRecords = ""

    // Loop through each record in the list
    for (record in records) {
        // Extract necessary information from the record
        val name = record["name"]
        val age = record["age"]
        val crime = record["crime"]
        val location = record["location"]

        // Concatenate the information with appropriate formatting
        concatenatedRecords += "Name: $name\nAge: $age\nCrime: $crime\nLocation: $location\n\n"
    }

    return concatenatedRecords
}

// Example usage
val policeRecords = listOf(
    mapOf(
        "name" to "John Doe",
        "age" to 32,
        "crime" to "Theft",
        "location" to "New York"
    ),
    mapOf(
        "name" to "Jane Smith",
        "age" to 41,
        "crime" to "Fraud",
        "location" to "Los Angeles"
    )
)
/**
 * Given a list of police records, this function concatenates the information together.
 *
 * @param records A list containing the individual police records.
 * @return A string containing the concatenated police records.
 */
fun concatenatePoliceRecords(records: List<Map<String, Any>>): String {
/**
 * Given a list of police records, this function concatenates the information together.
 *
 * @param records A list containing the individual police records.
 * @return A string containing the concatenated police records.
 */
fun concatenatePoliceRecords(records: List<Map<String, Any>>): String {

    // Initialize an empty string to store the concatenated records
    var concatenatedRecords = ""

    // Loop through each record in the list
    for (record in records) {
        // Extract necessary information from the record
        val name = record["name"]
        val age = record["age"]
        val crime = record["crime"]
        val location = record["location"]

        // Concatenate the information with appropriate formatting
        concatenatedRecords += "Name: $name\nAge: $age\nCrime: $crime\nLocation: $location\n\n"
    }

    return concatenatedRecords
}

// Example usage
val policeRecords = listOf(
    mapOf(
        "name" to "John Doe",
        "age" to 32,
        "crime" to "Theft",
        "location" to "New York"
    ),
    mapOf(
        "name" to "Jane Smith",
        "age" to 41,
        "crime" to "Fraud",
        "location" to "Los Angeles"
    )
)