/**
 * Takes two sets as input and returns the intersection of the sets.
 *
 * @param set1 First set.
 * @param set2 Second set.
 * @return Intersection of the sets.
 */
fun intersectionOfSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersectionSet = mutableSetOf<Any>()
    for (element in set1) {
        if (element in set2) {
            intersectionSet.add(element)
        }
    }
    return intersectionSet
}
/**
 * Takes two sets as input and returns the intersection of the sets.
 *
 * @param set1 First set.
 * @param set2 Second set.
 * @return Intersection of the sets.
 */
fun intersectionOfSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * Takes two sets as input and returns the intersection of the sets.
 *
 * @param set1 First set.
 * @param set2 Second set.
 * @return Intersection of the sets.
 */
fun intersectionOfSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersectionSet = mutableSetOf<Any>()
    for (element in set1) {
        if (element in set2) {
            intersectionSet.add(element)
        }
    }
    return intersectionSet
}