/**
 * This exercise aims to test your understanding of short-circuiting with if-else statements
 * and creating a tuple using the tuple() function. Given four variables representing geological
 * data, you need to complete the code in order to return a tuple containing the two intersecting
 * values between the provided datasets. The code must use short-circuiting with if-else and the
 * tuple() function. Good luck!
 *
 * @param a A list representing dataset A.
 * @param b A list representing dataset B.
 * @param c A list representing dataset C.
 * @param d A list representing dataset D.
 * @return A tuple containing the two intersecting values between the provided datasets.
 */
fun intersectionGeologist(a: List<Int>, b: List<Int>, c: List<Int>, d: List<Int>): Pair<Int, Int> {

    var intersectingValues = Pair(0, 0)

    // Iterate over each element in list a
    for (i in a) {
        // Perform short-circuiting using if-else statements
        if (i in b && i in c && i in d) {
            intersectingValues = Pair(i, i)
            break
        }
    }

    return intersectingValues
}
/**
 * This exercise aims to test your understanding of short-circuiting with if-else statements
 * and creating a tuple using the tuple() function. Given four variables representing geological
 * data, you need to complete the code in order to return a tuple containing the two intersecting
 * values between the provided datasets. The code must use short-circuiting with if-else and the
 * tuple() function. Good luck!
 *
 * @param a A list representing dataset A.
 * @param b A list representing dataset B.
 * @param c A list representing dataset C.
 * @param d A list representing dataset D.
 * @return A tuple containing the two intersecting values between the provided datasets.
 */
fun intersectionGeologist(a: List<Int>, b: List<Int>, c: List<Int>, d: List<Int>): Pair<Int, Int> {
/**
 * This exercise aims to test your understanding of short-circuiting with if-else statements
 * and creating a tuple using the tuple() function. Given four variables representing geological
 * data, you need to complete the code in order to return a tuple containing the two intersecting
 * values between the provided datasets. The code must use short-circuiting with if-else and the
 * tuple() function. Good luck!
 *
 * @param a A list representing dataset A.
 * @param b A list representing dataset B.
 * @param c A list representing dataset C.
 * @param d A list representing dataset D.
 * @return A tuple containing the two intersecting values between the provided datasets.
 */
fun intersectionGeologist(a: List<Int>, b: List<Int>, c: List<Int>, d: List<Int>): Pair<Int, Int> {

    var intersectingValues = Pair(0, 0)

    // Iterate over each element in list a
    for (i in a) {
        // Perform short-circuiting using if-else statements
        if (i in b && i in c && i in d) {
            intersectingValues = Pair(i, i)
            break
        }
    }

    return intersectingValues
}