/**
 * This function takes two sets of songs, musician_1_songs and musician_2_songs, and returns a set containing
 * the common songs between both musicians.
 *
 * @param musician1Songs A set of songs by musician 1.
 * @param musician2Songs A set of songs by musician 2.
 * @return A set containing the common songs between musician 1 and musician 2.
 *
 * Example:
 * val musician1Songs = setOf("Song A", "Song B", "Song C")
 * val musician2Songs = setOf("Song B", "Song C", "Song D")
 * findCommonSongs(musician1Songs, musician2Songs)
 * Output: [Song B, Song C]
 */
fun findCommonSongs(musician1Songs: Set<String>, musician2Songs: Set<String>): Set<String> {

    val commonSongs = mutableSetOf<String>()

    for (song1 in musician1Songs) {
        for (song2 in musician2Songs) {
            if (song1 == song2) {
                commonSongs.add(song1)
                break
            }
        }
    }

    return commonSongs
}
/**
 * This function takes two sets of songs, musician_1_songs and musician_2_songs, and returns a set containing
 * the common songs between both musicians.
 *
 * @param musician1Songs A set of songs by musician 1.
 * @param musician2Songs A set of songs by musician 2.
 * @return A set containing the common songs between musician 1 and musician 2.
 *
 * Example:
 * val musician1Songs = setOf("Song A", "Song B", "Song C")
 * val musician2Songs = setOf("Song B", "Song C", "Song D")
 * findCommonSongs(musician1Songs, musician2Songs)
 * Output: [Song B, Song C]
 */
fun findCommonSongs(musician1Songs: Set<String>, musician2Songs: Set<String>): Set<String> {
/**
 * This function takes two sets of songs, musician_1_songs and musician_2_songs, and returns a set containing
 * the common songs between both musicians.
 *
 * @param musician1Songs A set of songs by musician 1.
 * @param musician2Songs A set of songs by musician 2.
 * @return A set containing the common songs between musician 1 and musician 2.
 *
 * Example:
 * val musician1Songs = setOf("Song A", "Song B", "Song C")
 * val musician2Songs = setOf("Song B", "Song C", "Song D")
 * findCommonSongs(musician1Songs, musician2Songs)
 * Output: [Song B, Song C]
 */
fun findCommonSongs(musician1Songs: Set<String>, musician2Songs: Set<String>): Set<String> {

    val commonSongs = mutableSetOf<String>()

    for (song1 in musician1Songs) {
        for (song2 in musician2Songs) {
            if (song1 == song2) {
                commonSongs.add(song1)
                break
            }
        }
    }

    return commonSongs
}