/**
 * Finds the common elements between two lists using a nested loop and the OR operator.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list containing the common elements between list1 and list2.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<List<Any>> {

    val commonElements = mutableListOf<List<Any>>()

    for (element1 in list1) {
        for (element2 in list2) {
            if (element1 == element2 || listOf(element1, element2) in commonElements) {
                commonElements.add(listOf(element1, element2))
            }
        }
    }

    return commonElements
}
/**
 * Finds the common elements between two lists using a nested loop and the OR operator.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list containing the common elements between list1 and list2.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<List<Any>> {
/**
 * Finds the common elements between two lists using a nested loop and the OR operator.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list containing the common elements between list1 and list2.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<List<Any>> {

    val commonElements = mutableListOf<List<Any>>()

    for (element1 in list1) {
        for (element2 in list2) {
            if (element1 == element2 || listOf(element1, element2) in commonElements) {
                commonElements.add(listOf(element1, element2))
            }
        }
    }

    return commonElements
}