/**
 * Given two sets, return the intersection of the sets using a for loop.
 *
 * @param set1 First set
 * @param set2 Second set
 * @return Intersection of the two sets
 */
fun intersectionOfSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    // Initialize an empty set to store the intersection
    val intersectionSet = mutableSetOf<Any>()
    
    // Loop through each element in the first set
    for (element in set1) {
        // Check if the element is also present in the second set
        if (element in set2) {
            // Add the element to the intersection set
            intersectionSet.add(element)
        }
    }
    
    return intersectionSet
}
/**
 * Given two sets, return the intersection of the sets using a for loop.
 *
 * @param set1 First set
 * @param set2 Second set
 * @return Intersection of the two sets
 */
fun intersectionOfSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * Given two sets, return the intersection of the sets using a for loop.
 *
 * @param set1 First set
 * @param set2 Second set
 * @return Intersection of the two sets
 */
fun intersectionOfSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    // Initialize an empty set to store the intersection
    val intersectionSet = mutableSetOf<Any>()
    
    // Loop through each element in the first set
    for (element in set1) {
        // Check if the element is also present in the second set
        if (element in set2) {
            // Add the element to the intersection set
            intersectionSet.add(element)
        }
    }
    
    return intersectionSet
}