/**
 * Given two sets A and B, find their intersection.
 *
 * @param A The first set.
 * @param B The second set.
 * @return The intersection of A and B.
 */
fun intersection(A: Set<Any>, B: Set<Any>): Set<Any> {

    val intersectionSet = mutableSetOf<Any>()
    for (element in A) {
        if (element in B) {
            intersectionSet.add(element)
        }
    }
    return intersectionSet
}
/**
 * Given two sets A and B, find their intersection.
 *
 * @param A The first set.
 * @param B The second set.
 * @return The intersection of A and B.
 */
fun intersection(A: Set<Any>, B: Set<Any>): Set<Any> {
/**
 * Given two sets A and B, find their intersection.
 *
 * @param A The first set.
 * @param B The second set.
 * @return The intersection of A and B.
 */
fun intersection(A: Set<Any>, B: Set<Any>): Set<Any> {

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