/**
 * This function takes a list of numbers and a list of sets, and returns a list containing all the numbers
 * that are present in every set.
 */
fun findIntersection(numbers: List<Int>, sets: List<Set<Int>>): List<Int> {

    // Initialize an empty list to store the common numbers
    val commonNumbers = mutableListOf<Int>()

    // Iterate through each number in the list of numbers
    for (number in numbers) {
        // Flag for checking if the number is present in all sets
        var isCommon = true

        // Iterate through each set in the list of sets
        for (group in sets) {
            // Check if the number is present in the current set
            if (number !in group) {
                isCommon = false
                break
            }
        }

        // If the number is present in all sets, add it to the common numbers list
        if (isCommon) {
            commonNumbers.add(number)
        }
    }

    return commonNumbers
}
/**
 * This function takes a list of numbers and a list of sets, and returns a list containing all the numbers
 * that are present in every set.
 */
fun findIntersection(numbers: List<Int>, sets: List<Set<Int>>): List<Int> {
/**
 * This function takes a list of numbers and a list of sets, and returns a list containing all the numbers
 * that are present in every set.
 */
fun findIntersection(numbers: List<Int>, sets: List<Set<Int>>): List<Int> {

    // Initialize an empty list to store the common numbers
    val commonNumbers = mutableListOf<Int>()

    // Iterate through each number in the list of numbers
    for (number in numbers) {
        // Flag for checking if the number is present in all sets
        var isCommon = true

        // Iterate through each set in the list of sets
        for (group in sets) {
            // Check if the number is present in the current set
            if (number !in group) {
                isCommon = false
                break
            }
        }

        // If the number is present in all sets, add it to the common numbers list
        if (isCommon) {
            commonNumbers.add(number)
        }
    }

    return commonNumbers
}