/**
 * This function takes in three lists as arguments and finds the common elements among them.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>, list3: List<Any>): Set<Any> {

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

    // Iterate over each element in the first list
    for (elem1 in list1) {
        // Check if the current element is present in the second list
        if (elem1 in list2) {
            // Check if the current element is present in the third list
            if (elem1 in list3) {
                // Add the current element to the set of common elements
                commonElements.add(elem1)
            }
        }
    }

    return commonElements
}
/**
 * This function takes in three lists as arguments and finds the common elements among them.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>, list3: List<Any>): Set<Any> {
/**
 * This function takes in three lists as arguments and finds the common elements among them.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>, list3: List<Any>): Set<Any> {

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

    // Iterate over each element in the first list
    for (elem1 in list1) {
        // Check if the current element is present in the second list
        if (elem1 in list2) {
            // Check if the current element is present in the third list
            if (elem1 in list3) {
                // Add the current element to the set of common elements
                commonElements.add(elem1)
            }
        }
    }

    return commonElements
}