/**
 * Given two sets a and b, this function returns their intersection,
 * which consists of elements that are present in both sets.
 *
 * @param a First set
 * @param b Second set
 * @return Intersection of a and b
 */
fun intersection(a: Set<Any>, b: Set<Any>): Set<Any> {

    val result = mutableSetOf<Any>()
    for (element in a) {
        if (element in b) {
            result.add(element)
        }
    }
    return result
}
/**
 * Given two sets a and b, this function returns their intersection,
 * which consists of elements that are present in both sets.
 *
 * @param a First set
 * @param b Second set
 * @return Intersection of a and b
 */
fun intersection(a: Set<Any>, b: Set<Any>): Set<Any> {
/**
 * Given two sets a and b, this function returns their intersection,
 * which consists of elements that are present in both sets.
 *
 * @param a First set
 * @param b Second set
 * @return Intersection of a and b
 */
fun intersection(a: Set<Any>, b: Set<Any>): Set<Any> {

    val result = mutableSetOf<Any>()
    for (element in a) {
        if (element in b) {
            result.add(element)
        }
    }
    return result
}