/**
 * Given two sets, convert them to lists, perform a left shift operation on the first list,
 * right shift operation on the second list, and return the intersection of the two shifted lists.
 */
fun intersectionShiftConversion(data1: Set<Any>, data2: Set<Any>): List<Any> {

    // Convert sets to lists
    val list1 = data1.toList()
    val list2 = data2.toList()

    // Perform left shift operation on list1
    val leftShift = (0..list1.size - 1).random()
    val shiftedList1 = list1.drop(leftShift) + list1.take(leftShift)

    // Perform right shift operation on list2
    val rightShift = (0..list2.size - 1).random()
    val shiftedList2 = list2.takeLast(rightShift) + list2.dropLast(rightShift)

    // Find the intersection of the shifted lists
    val intersection = shiftedList1.intersect(shiftedList2).toList()

    return intersection
}
/**
 * Given two sets, convert them to lists, perform a left shift operation on the first list,
 * right shift operation on the second list, and return the intersection of the two shifted lists.
 */
fun intersectionShiftConversion(data1: Set<Any>, data2: Set<Any>): List<Any> {
/**
 * Given two sets, convert them to lists, perform a left shift operation on the first list,
 * right shift operation on the second list, and return the intersection of the two shifted lists.
 */
fun intersectionShiftConversion(data1: Set<Any>, data2: Set<Any>): List<Any> {

    // Convert sets to lists
    val list1 = data1.toList()
    val list2 = data2.toList()

    // Perform left shift operation on list1
    val leftShift = (0..list1.size - 1).random()
    val shiftedList1 = list1.drop(leftShift) + list1.take(leftShift)

    // Perform right shift operation on list2
    val rightShift = (0..list2.size - 1).random()
    val shiftedList2 = list2.takeLast(rightShift) + list2.dropLast(rightShift)

    // Find the intersection of the shifted lists
    val intersection = shiftedList1.intersect(shiftedList2).toList()

    return intersection
}