/**
 * Given two lists of artists, return a new list containing the artists that appear in both lists.
 *
 * @param artist1 The first list of artists.
 * @param artist2 The second list of artists.
 * @return A new list of artists that appear in both artist1 and artist2.
 */
fun artistUnion(artist1: List<String>, artist2: List<String>): List<String> {

    val commonArtists = mutableListOf<String>()

    for (artistA in artist1) {
        for (artistB in artist2) {
            if (artistA == artistB) {
                commonArtists.add(artistA)
            }
        }
    }

    return commonArtists
}
/**
 * Given two lists of artists, return a new list containing the artists that appear in both lists.
 *
 * @param artist1 The first list of artists.
 * @param artist2 The second list of artists.
 * @return A new list of artists that appear in both artist1 and artist2.
 */
fun artistUnion(artist1: List<String>, artist2: List<String>): List<String> {
/**
 * Given two lists of artists, return a new list containing the artists that appear in both lists.
 *
 * @param artist1 The first list of artists.
 * @param artist2 The second list of artists.
 * @return A new list of artists that appear in both artist1 and artist2.
 */
fun artistUnion(artist1: List<String>, artist2: List<String>): List<String> {

    val commonArtists = mutableListOf<String>()

    for (artistA in artist1) {
        for (artistB in artist2) {
            if (artistA == artistB) {
                commonArtists.add(artistA)
            }
        }
    }

    return commonArtists
}