/**
 * This function removes duplicates from both lists using set comprehension.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return Pair of lists where duplicates are removed from list1 and list2
 */
fun removeDuplicates(list1: List<Any>, list2: List<Any>): Pair<List<Any>, List<Any>> {

    val newList1 = list1.filterIndexed { index, item -> item !in list1.subList(0, index) }
    val newList2 = list2.filterIndexed { index, item -> item !in list2.subList(0, index) }

    return Pair(newList1, newList2)
}
/**
 * This function removes duplicates from both lists using set comprehension.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return Pair of lists where duplicates are removed from list1 and list2
 */
fun removeDuplicates(list1: List<Any>, list2: List<Any>): Pair<List<Any>, List<Any>> {
/**
 * This function removes duplicates from both lists using set comprehension.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return Pair of lists where duplicates are removed from list1 and list2
 */
fun removeDuplicates(list1: List<Any>, list2: List<Any>): Pair<List<Any>, List<Any>> {

    val newList1 = list1.filterIndexed { index, item -> item !in list1.subList(0, index) }
    val newList2 = list2.filterIndexed { index, item -> item !in list2.subList(0, index) }

    return Pair(newList1, newList2)
}