/**
 * Given two sets, returns their intersection elements.
 */
fun intersectionSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    // Initialize an empty set to store the intersection
    val intersection = mutableSetOf<Any>()
    
    for (element in set1) {
        if (element in set2) {  // Check if the element exists in the second set
            // Add the element to the intersection set
            intersection.add(element)
        }
    }
    
    return intersection
}
/**
 * Given two sets, returns their intersection elements.
 */
fun intersectionSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * Given two sets, returns their intersection elements.
 */
fun intersectionSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    // Initialize an empty set to store the intersection
    val intersection = mutableSetOf<Any>()
    
    for (element in set1) {
        if (element in set2) {  // Check if the element exists in the second set
            // Add the element to the intersection set
            intersection.add(element)
        }
    }
    
    return intersection
}