/**
 * Given a list of songs and a list of instruments, this function returns a map
 * that contains the songs as keys and a list of instruments used to play each song as values.
 */
fun songComposer(songs: List<String>, instruments: List<String>): Map<String, List<String>> {

    val songsInstruments = mutableMapOf<String, List<String>>()

    for (song in songs) {
        val instrumentsUsed = mutableListOf<String>()
        for (instrument in instruments) {
            // Check if the instrument is used in the current song
            if (song.contains(instrument)) {
                instrumentsUsed.add(instrument)
            }
        }
        if (instrumentsUsed.isNotEmpty()) {
            songsInstruments[song] = instrumentsUsed
        }
    }

    return songsInstruments
}
/**
 * Given a list of songs and a list of instruments, this function returns a map
 * that contains the songs as keys and a list of instruments used to play each song as values.
 */
fun songComposer(songs: List<String>, instruments: List<String>): Map<String, List<String>> {
/**
 * Given a list of songs and a list of instruments, this function returns a map
 * that contains the songs as keys and a list of instruments used to play each song as values.
 */
fun songComposer(songs: List<String>, instruments: List<String>): Map<String, List<String>> {

    val songsInstruments = mutableMapOf<String, List<String>>()

    for (song in songs) {
        val instrumentsUsed = mutableListOf<String>()
        for (instrument in instruments) {
            // Check if the instrument is used in the current song
            if (song.contains(instrument)) {
                instrumentsUsed.add(instrument)
            }
        }
        if (instrumentsUsed.isNotEmpty()) {
            songsInstruments[song] = instrumentsUsed
        }
    }

    return songsInstruments
}