/**
 * This function takes in a dictionary containing information about various dancers,
 * and a list of sets of dancers to be performed. It returns a set of dancers who can perform all the sets.
 *
 * @param dancers A dictionary containing dancer information with dancer names as keys and a set of dance styles
 *                that the dancer can perform as values.
 * @param sets A list of sets of dancers to be performed, where each set is represented as a list of dancer names.
 * @return A set of dancers who can perform all the sets.
 */
fun selectDancers(dancers: Map<String, Set<String>>, sets: List<List<String>>): Set<String> {

    var intersect = dancers.keys.toSet()

    for (set in sets) {
        intersect = intersect.intersect(set.toSet())
    }

    return intersect
}
/**
 * This function takes in a dictionary containing information about various dancers,
 * and a list of sets of dancers to be performed. It returns a set of dancers who can perform all the sets.
 *
 * @param dancers A dictionary containing dancer information with dancer names as keys and a set of dance styles
 *                that the dancer can perform as values.
 * @param sets A list of sets of dancers to be performed, where each set is represented as a list of dancer names.
 * @return A set of dancers who can perform all the sets.
 */
fun selectDancers(dancers: Map<String, Set<String>>, sets: List<List<String>>): Set<String> {
/**
 * This function takes in a dictionary containing information about various dancers,
 * and a list of sets of dancers to be performed. It returns a set of dancers who can perform all the sets.
 *
 * @param dancers A dictionary containing dancer information with dancer names as keys and a set of dance styles
 *                that the dancer can perform as values.
 * @param sets A list of sets of dancers to be performed, where each set is represented as a list of dancer names.
 * @return A set of dancers who can perform all the sets.
 */
fun selectDancers(dancers: Map<String, Set<String>>, sets: List<List<String>>): Set<String> {

    var intersect = dancers.keys.toSet()

    for (set in sets) {
        intersect = intersect.intersect(set.toSet())
    }

    return intersect
}