/**
 * This function simulates a musician playing an instrument. It subtracts the notes
 * of the song from the instrument's available notes and returns the remaining notes.
 *
 * @param instrument The instrument being played.
 * @param song The song being played.
 * @return The remaining notes after playing the song on the instrument.
 */
fun playInstrument(instrument: String, song: String): String {

    val availableNotes = mapOf(
        "piano" to "CDEFGAB",
        "guitar" to "ABCDEFG",
        "violin" to "GABCD",
        "flute" to "CDEFG"
    )

    var remainingNotes = availableNotes[instrument].orEmpty()

    for (note in song) {
        remainingNotes = remainingNotes.replace(note.toString(), "")
    }

    return remainingNotes
}
/**
 * This function simulates a musician playing an instrument. It subtracts the notes
 * of the song from the instrument's available notes and returns the remaining notes.
 *
 * @param instrument The instrument being played.
 * @param song The song being played.
 * @return The remaining notes after playing the song on the instrument.
 */
fun playInstrument(instrument: String, song: String): String {
/**
 * This function simulates a musician playing an instrument. It subtracts the notes
 * of the song from the instrument's available notes and returns the remaining notes.
 *
 * @param instrument The instrument being played.
 * @param song The song being played.
 * @return The remaining notes after playing the song on the instrument.
 */
fun playInstrument(instrument: String, song: String): String {

    val availableNotes = mapOf(
        "piano" to "CDEFGAB",
        "guitar" to "ABCDEFG",
        "violin" to "GABCD",
        "flute" to "CDEFG"
    )

    var remainingNotes = availableNotes[instrument].orEmpty()

    for (note in song) {
        remainingNotes = remainingNotes.replace(note.toString(), "")
    }

    return remainingNotes
}