/**
 * This function allows a musician to play a song on their instrument
 * by looping through the notes provided.
 *
 * @param instrument The name of the instrument being used.
 * @param notes A list of notes to be played.
 */
fun playSong(instrument: String, notes: List<String>) {

    println("Using $instrument to play the song:")

    var index = 0
    while (true) {
        val note = notes[index]
        println("Playing $note on $instrument")

        index++
        if (index == notes.size) {
            // Reset the index to 0 and play the song from the beginning
            index = 0
        }

        if (index % 3 == 0) {
            // Do something special every third note
            println("$instrument is shining!")
        }

        // Implement the code here to complete the exercise
    }
}
/**
 * This function allows a musician to play a song on their instrument
 * by looping through the notes provided.
 *
 * @param instrument The name of the instrument being used.
 * @param notes A list of notes to be played.
 */
fun playSong(instrument: String, notes: List<String>) {
/**
 * This function allows a musician to play a song on their instrument
 * by looping through the notes provided.
 *
 * @param instrument The name of the instrument being used.
 * @param notes A list of notes to be played.
 */
fun playSong(instrument: String, notes: List<String>) {

    println("Using $instrument to play the song:")

    var index = 0
    while (true) {
        val note = notes[index]
        println("Playing $note on $instrument")

        index++
        if (index == notes.size) {
            // Reset the index to 0 and play the song from the beginning
            index = 0
        }

        if (index % 3 == 0) {
            // Do something special every third note
            println("$instrument is shining!")
        }

        // Implement the code here to complete the exercise
    }
}