/**
 * This function takes a set and a tuple as input and returns the index of a common element in the tuple.
 *
 * @param s A set containing elements.
 * @param t A tuple containing elements.
 * @return The index of a common element in the tuple. If there is no common element, return -1.
 *
 * Example:
 * getCommonElementIndex(setOf(1, 2, 3), listOf(4, 5, 1, 6)) // Output: 2
 * getCommonElementIndex(setOf(9, 8, 7), listOf(1, 2, 3, 4, 5)) // Output: -1
 */
fun getCommonElementIndex(s: Set<Int>, t: List<Int>): Int {

    // Iterate through the set
    for (element in s) {
        // Check if the element is in the tuple
        if (element in t) {
            // Return the index of the common element
            return t.indexOf(element)
        }
    }
    // If there is no common element, return -1
    return -1
}
/**
 * This function takes a set and a tuple as input and returns the index of a common element in the tuple.
 *
 * @param s A set containing elements.
 * @param t A tuple containing elements.
 * @return The index of a common element in the tuple. If there is no common element, return -1.
 *
 * Example:
 * getCommonElementIndex(setOf(1, 2, 3), listOf(4, 5, 1, 6)) // Output: 2
 * getCommonElementIndex(setOf(9, 8, 7), listOf(1, 2, 3, 4, 5)) // Output: -1
 */
fun getCommonElementIndex(s: Set<Int>, t: List<Int>): Int {
/**
 * This function takes a set and a tuple as input and returns the index of a common element in the tuple.
 *
 * @param s A set containing elements.
 * @param t A tuple containing elements.
 * @return The index of a common element in the tuple. If there is no common element, return -1.
 *
 * Example:
 * getCommonElementIndex(setOf(1, 2, 3), listOf(4, 5, 1, 6)) // Output: 2
 * getCommonElementIndex(setOf(9, 8, 7), listOf(1, 2, 3, 4, 5)) // Output: -1
 */
fun getCommonElementIndex(s: Set<Int>, t: List<Int>): Int {

    // Iterate through the set
    for (element in s) {
        // Check if the element is in the tuple
        if (element in t) {
            // Return the index of the common element
            return t.indexOf(element)
        }
    }
    // If there is no common element, return -1
    return -1
}