/**
 * Given two sets of songs by two musicians, find the songs they both like.
 *
 * @param musicianA a set containing the songs liked by musician A
 * @param musicianB a set containing the songs liked by musician B
 * @return A set containing the songs that both musicians like.
 */
fun findSharedSongs(musicianA: Set<String>, musicianB: Set<String>): Set<String> {

    // Initialize an empty set to store the shared songs
    val sharedSongs = mutableSetOf<String>()

    // Nested loops to iterate over each song liked by musician A and musician B
    for (songA in musicianA) {
        for (songB in musicianB) {
            if (songA == songB) {
                // Add the shared song to the set
                sharedSongs.add(songA)
                break
            }
        }
    }

    return sharedSongs
}
/**
 * Given two sets of songs by two musicians, find the songs they both like.
 *
 * @param musicianA a set containing the songs liked by musician A
 * @param musicianB a set containing the songs liked by musician B
 * @return A set containing the songs that both musicians like.
 */
fun findSharedSongs(musicianA: Set<String>, musicianB: Set<String>): Set<String> {
/**
 * Given two sets of songs by two musicians, find the songs they both like.
 *
 * @param musicianA a set containing the songs liked by musician A
 * @param musicianB a set containing the songs liked by musician B
 * @return A set containing the songs that both musicians like.
 */
fun findSharedSongs(musicianA: Set<String>, musicianB: Set<String>): Set<String> {

    // Initialize an empty set to store the shared songs
    val sharedSongs = mutableSetOf<String>()

    // Nested loops to iterate over each song liked by musician A and musician B
    for (songA in musicianA) {
        for (songB in musicianB) {
            if (songA == songB) {
                // Add the shared song to the set
                sharedSongs.add(songA)
                break
            }
        }
    }

    return sharedSongs
}