/**
 * Takes in two lists and performs the following operations:
 * 1. Removes duplicate elements from both lists.
 * 2. Deletes common elements found in the intersection of the two lists.
 * 3. Returns the modified lists.
 *
 * @param items1 First list of items.
 * @param items2 Second list of items.
 * @return A tuple containing the modified lists.
 */
fun intersectionDeletionMembership(items1: List<Any>, items2: List<Any>): Pair<List<Any>, List<Any>> {

    // Remove duplicates from both lists
    val uniqueItems1 = items1.toSet().toList()
    val uniqueItems2 = items2.toSet().toList()

    // Find the common elements in both lists
    val intersection = uniqueItems1.intersect(uniqueItems2)

    // Delete the common elements from both lists
    val modifiedItems1 = uniqueItems1.filter { !intersection.contains(it) }
    val modifiedItems2 = uniqueItems2.filter { !intersection.contains(it) }

    return Pair(modifiedItems1, modifiedItems2)
}
/**
 * Takes in two lists and performs the following operations:
 * 1. Removes duplicate elements from both lists.
 * 2. Deletes common elements found in the intersection of the two lists.
 * 3. Returns the modified lists.
 *
 * @param items1 First list of items.
 * @param items2 Second list of items.
 * @return A tuple containing the modified lists.
 */
fun intersectionDeletionMembership(items1: List<Any>, items2: List<Any>): Pair<List<Any>, List<Any>> {
/**
 * Takes in two lists and performs the following operations:
 * 1. Removes duplicate elements from both lists.
 * 2. Deletes common elements found in the intersection of the two lists.
 * 3. Returns the modified lists.
 *
 * @param items1 First list of items.
 * @param items2 Second list of items.
 * @return A tuple containing the modified lists.
 */
fun intersectionDeletionMembership(items1: List<Any>, items2: List<Any>): Pair<List<Any>, List<Any>> {

    // Remove duplicates from both lists
    val uniqueItems1 = items1.toSet().toList()
    val uniqueItems2 = items2.toSet().toList()

    // Find the common elements in both lists
    val intersection = uniqueItems1.intersect(uniqueItems2)

    // Delete the common elements from both lists
    val modifiedItems1 = uniqueItems1.filter { !intersection.contains(it) }
    val modifiedItems2 = uniqueItems2.filter { !intersection.contains(it) }

    return Pair(modifiedItems1, modifiedItems2)
}