/**
 * Given a list of artists, print the names of artists who have more than one artwork.
 *
 * @param artists A list of artists with their unique art pieces.
 */
fun printArtwork(artists: List<Map<String, Any>>) {

    // Create an empty list to store the names of the artists
    val artistNames = mutableListOf<String>()

    // Iterate through the list of artists
    for (artist in artists) {
        // Check if the artist has more than one artwork
        if ((artist["artworks"] as List<*>).size > 1) {
            // Add the artist's name to the list
            artistNames.add(artist["name"] as String)
        }
    }

    // Print the names of the artists who have more than one artwork
    for (name in artistNames) {
        println(name)
    }
}
/**
 * Given a list of artists, print the names of artists who have more than one artwork.
 *
 * @param artists A list of artists with their unique art pieces.
 */
fun printArtwork(artists: List<Map<String, Any>>) {
/**
 * Given a list of artists, print the names of artists who have more than one artwork.
 *
 * @param artists A list of artists with their unique art pieces.
 */
fun printArtwork(artists: List<Map<String, Any>>) {

    // Create an empty list to store the names of the artists
    val artistNames = mutableListOf<String>()

    // Iterate through the list of artists
    for (artist in artists) {
        // Check if the artist has more than one artwork
        if ((artist["artworks"] as List<*>).size > 1) {
            // Add the artist's name to the list
            artistNames.add(artist["name"] as String)
        }
    }

    // Print the names of the artists who have more than one artwork
    for (name in artistNames) {
        println(name)
    }
}