/**
 * This function takes two sets as input and returns a list of elements that are common to both sets.
 */
fun getCommonElements(set1: Set<Any>, set2: Set<Any>): List<Any> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate through each element in the first set
    for (element in set1) {
        // Start with an assumption that the element is common to both sets
        var isCommon = true

        // Iterate through each element in the second set
        for (otherElement in set2) {
            // Compare the current element with each element in the second set
            if (element != otherElement) {
                // If there is a mismatch, set isCommon to false and break out of the inner loop
                isCommon = false
                break
            }
        }

        // If the element is common to both sets, add it to the commonElements list
        if (isCommon) {
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * This function takes two sets as input and returns a list of elements that are common to both sets.
 */
fun getCommonElements(set1: Set<Any>, set2: Set<Any>): List<Any> {
/**
 * This function takes two sets as input and returns a list of elements that are common to both sets.
 */
fun getCommonElements(set1: Set<Any>, set2: Set<Any>): List<Any> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate through each element in the first set
    for (element in set1) {
        // Start with an assumption that the element is common to both sets
        var isCommon = true

        // Iterate through each element in the second set
        for (otherElement in set2) {
            // Compare the current element with each element in the second set
            if (element != otherElement) {
                // If there is a mismatch, set isCommon to false and break out of the inner loop
                isCommon = false
                break
            }
        }

        // If the element is common to both sets, add it to the commonElements list
        if (isCommon) {
            commonElements.add(element)
        }
    }

    return commonElements
}