/**
 * This function takes in two nested lists and returns a list of common elements in both lists.
 */
fun findCommonElements(lst1: List<List<Int>>, lst2: List<List<Int>>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (sublist1 in lst1) {
        for (sublist2 in lst2) {
            for (element1 in sublist1) {
                for (element2 in sublist2) {
                    if (element1 == element2) {
                        commonElements.add(element1)
                    }
                }
            }
        }
    }

    return commonElements
}
/**
 * This function takes in two nested lists and returns a list of common elements in both lists.
 */
fun findCommonElements(lst1: List<List<Int>>, lst2: List<List<Int>>): List<Int> {
/**
 * This function takes in two nested lists and returns a list of common elements in both lists.
 */
fun findCommonElements(lst1: List<List<Int>>, lst2: List<List<Int>>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (sublist1 in lst1) {
        for (sublist2 in lst2) {
            for (element1 in sublist1) {
                for (element2 in sublist2) {
                    if (element1 == element2) {
                        commonElements.add(element1)
                    }
                }
            }
        }
    }

    return commonElements
}