/**
 * This function takes in two sets: musicians and fans.
 * It returns a set of musicians who are not fans of any other musician in the fans set.
 *
 * @param musicians a set of musicians.
 * @param fans a set of fans.
 * @return A set of musicians who are not fans of any other musician in the fans set.
 */
fun findNonFans(musicians: Set<String>, fans: Set<String>): Set<String> {

    val nonFans = mutableSetOf<String>()  // Initialize an empty set to store non-fan musicians

    for (musician in musicians) {
        var isFanOfAny = false  // Flag to check if musician is a fan of any other musician
        for (fan in fans) {
            if (musician != fan && fan in musicians) {
                isFanOfAny = true
                break
            }
        }
        if (!isFanOfAny) {  // If musician is not a fan of any other musician
            nonFans.add(musician)
        }
    }

    return nonFans
}
/**
 * This function takes in two sets: musicians and fans.
 * It returns a set of musicians who are not fans of any other musician in the fans set.
 *
 * @param musicians a set of musicians.
 * @param fans a set of fans.
 * @return A set of musicians who are not fans of any other musician in the fans set.
 */
fun findNonFans(musicians: Set<String>, fans: Set<String>): Set<String> {
/**
 * This function takes in two sets: musicians and fans.
 * It returns a set of musicians who are not fans of any other musician in the fans set.
 *
 * @param musicians a set of musicians.
 * @param fans a set of fans.
 * @return A set of musicians who are not fans of any other musician in the fans set.
 */
fun findNonFans(musicians: Set<String>, fans: Set<String>): Set<String> {

    val nonFans = mutableSetOf<String>()  // Initialize an empty set to store non-fan musicians

    for (musician in musicians) {
        var isFanOfAny = false  // Flag to check if musician is a fan of any other musician
        for (fan in fans) {
            if (musician != fan && fan in musicians) {
                isFanOfAny = true
                break
            }
        }
        if (!isFanOfAny) {  // If musician is not a fan of any other musician
            nonFans.add(musician)
        }
    }

    return nonFans
}