/**
 * Given a dictionary of artists and their albums,
 * find all the albums released by a specific artist.
 *
 * @param artists a dictionary that maps an artist to a list of their albums
 * @return a list of albums released by the artist
 */
fun findArtistAlbums(artists: Map<String, List<String>>): List<String> {

    val artistName = readLine() ?: ""
    val albums = mutableListOf<String>()

    // Loop through each artist in the dictionary
    for ((artist, artistAlbums) in artists) {
        // Check if the current artist is the one we are interested in
        if (artist == artistName) {
            // Loop through each album of the artist
            for (album in artistAlbums) {
                // Add the album to the list
                albums.add(album)
            }
        }
    }

    return albums
}
/**
 * Given a dictionary of artists and their albums,
 * find all the albums released by a specific artist.
 *
 * @param artists a dictionary that maps an artist to a list of their albums
 * @return a list of albums released by the artist
 */
fun findArtistAlbums(artists: Map<String, List<String>>): List<String> {
/**
 * Given a dictionary of artists and their albums,
 * find all the albums released by a specific artist.
 *
 * @param artists a dictionary that maps an artist to a list of their albums
 * @return a list of albums released by the artist
 */
fun findArtistAlbums(artists: Map<String, List<String>>): List<String> {

    val artistName = readLine() ?: ""
    val albums = mutableListOf<String>()

    // Loop through each artist in the dictionary
    for ((artist, artistAlbums) in artists) {
        // Check if the current artist is the one we are interested in
        if (artist == artistName) {
            // Loop through each album of the artist
            for (album in artistAlbums) {
                // Add the album to the list
                albums.add(album)
            }
        }
    }

    return albums
}