/**
 * Given three sets, find the common elements between them using nested loops and the OR operator
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>, set3: Set<Int>): Set<Int> {

    val commonElements = mutableSetOf<Int>()

    // Iterate through each element in the first set
    for (elem1 in set1) {
        // Iterate through each element in the second set
        for (elem2 in set2) {
            // Iterate through each element in the third set
            for (elem3 in set3) {
                // Check if any of the three elements are common
                if (elem1 == elem2 || elem1 == elem3 || elem2 == elem3) {
                    // Add the common element to the set of common elements
                    commonElements.add(elem1)
                }
            }
        }
    }

    return commonElements
}
/**
 * Given three sets, find the common elements between them using nested loops and the OR operator
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>, set3: Set<Int>): Set<Int> {
/**
 * Given three sets, find the common elements between them using nested loops and the OR operator
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>, set3: Set<Int>): Set<Int> {

    val commonElements = mutableSetOf<Int>()

    // Iterate through each element in the first set
    for (elem1 in set1) {
        // Iterate through each element in the second set
        for (elem2 in set2) {
            // Iterate through each element in the third set
            for (elem3 in set3) {
                // Check if any of the three elements are common
                if (elem1 == elem2 || elem1 == elem3 || elem2 == elem3) {
                    // Add the common element to the set of common elements
                    commonElements.add(elem1)
                }
            }
        }
    }

    return commonElements
}