/**
 * Given two sequences, find the intersection of the two sequences.
 *
 * @param sequence1 The first sequence.
 * @param sequence2 The second sequence.
 * @return A tuple containing the elements that are common in both sequences.
 */
fun intersectSequences(sequence1: List<Any>, sequence2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    for (item1 in sequence1) {
        for (item2 in sequence2) {
            if (item1 == item2) {
                intersection.add(item1)
            }
        }
    }
    return intersection
}
/**
 * Given two sequences, find the intersection of the two sequences.
 *
 * @param sequence1 The first sequence.
 * @param sequence2 The second sequence.
 * @return A tuple containing the elements that are common in both sequences.
 */
fun intersectSequences(sequence1: List<Any>, sequence2: List<Any>): List<Any> {
/**
 * Given two sequences, find the intersection of the two sequences.
 *
 * @param sequence1 The first sequence.
 * @param sequence2 The second sequence.
 * @return A tuple containing the elements that are common in both sequences.
 */
fun intersectSequences(sequence1: List<Any>, sequence2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    for (item1 in sequence1) {
        for (item2 in sequence2) {
            if (item1 == item2) {
                intersection.add(item1)
            }
        }
    }
    return intersection
}