/**
 * Given two sets s1 and s2, iterate through their intersection
 * and print each element.
 *
 * Example:
 * val s1 = setOf(1, 2, 3, 4, 5)
 * val s2 = setOf(4, 5, 6, 7, 8)
 * iterateSets(s1, s2)
 *
 * Output:
 * 4
 * 5
 */
fun iterateSets(s1: Set<Int>, s2: Set<Int>) {

    val intersection = s1.intersect(s2) // Compute the intersection between s1 and s2

    // Iterate through the intersection and print each element
    for (num in intersection) {
        println(num)
    }
}
/**
 * Given two sets s1 and s2, iterate through their intersection
 * and print each element.
 *
 * Example:
 * val s1 = setOf(1, 2, 3, 4, 5)
 * val s2 = setOf(4, 5, 6, 7, 8)
 * iterateSets(s1, s2)
 *
 * Output:
 * 4
 * 5
 */
fun iterateSets(s1: Set<Int>, s2: Set<Int>) {
/**
 * Given two sets s1 and s2, iterate through their intersection
 * and print each element.
 *
 * Example:
 * val s1 = setOf(1, 2, 3, 4, 5)
 * val s2 = setOf(4, 5, 6, 7, 8)
 * iterateSets(s1, s2)
 *
 * Output:
 * 4
 * 5
 */
fun iterateSets(s1: Set<Int>, s2: Set<Int>) {

    val intersection = s1.intersect(s2) // Compute the intersection between s1 and s2

    // Iterate through the intersection and print each element
    for (num in intersection) {
        println(num)
    }
}