/**
 * This function takes two integers 'n' and 'm' as input and returns a nested list of empty lists.
 * The nested list has 'n' number of empty lists, where each empty list has 'm' number of empty lists inside it.
 *
 * Example:
 * createEmptyLists(2, 3) -> [[[], [], []], [[], [], []]]
 *
 * @param n An integer specifying the number of empty lists at the outermost level.
 * @param m An integer specifying the number of empty lists at the inner level within each outer list.
 * @return A nested list of empty lists.
 */
fun createEmptyLists(n: Int, m: Int): List<List<List<Any>>> {

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

    // Iterate 'n' times for the outer level
    repeat(n) {
        val outerList = mutableListOf<List<Any>>()

        // Iterate 'm' times for the inner level within each outer list
        repeat(m) {
            val innerList = mutableListOf<Any>()
            outerList.add(innerList)
        }

        nestedLists.add(outerList)
    }

    return nestedLists
}

// Create a nested list with 3 empty lists at the outer level, each having 4 empty lists within it.
val result = createEmptyLists(3, 4)
/**
 * This function takes two integers 'n' and 'm' as input and returns a nested list of empty lists.
 * The nested list has 'n' number of empty lists, where each empty list has 'm' number of empty lists inside it.
 *
 * Example:
 * createEmptyLists(2, 3) -> [[[], [], []], [[], [], []]]
 *
 * @param n An integer specifying the number of empty lists at the outermost level.
 * @param m An integer specifying the number of empty lists at the inner level within each outer list.
 * @return A nested list of empty lists.
 */
fun createEmptyLists(n: Int, m: Int): List<List<List<Any>>> {
/**
 * This function takes two integers 'n' and 'm' as input and returns a nested list of empty lists.
 * The nested list has 'n' number of empty lists, where each empty list has 'm' number of empty lists inside it.
 *
 * Example:
 * createEmptyLists(2, 3) -> [[[], [], []], [[], [], []]]
 *
 * @param n An integer specifying the number of empty lists at the outermost level.
 * @param m An integer specifying the number of empty lists at the inner level within each outer list.
 * @return A nested list of empty lists.
 */
fun createEmptyLists(n: Int, m: Int): List<List<List<Any>>> {

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

    // Iterate 'n' times for the outer level
    repeat(n) {
        val outerList = mutableListOf<List<Any>>()

        // Iterate 'm' times for the inner level within each outer list
        repeat(m) {
            val innerList = mutableListOf<Any>()
            outerList.add(innerList)
        }

        nestedLists.add(outerList)
    }

    return nestedLists
}

// Create a nested list with 3 empty lists at the outer level, each having 4 empty lists within it.
val result = createEmptyLists(3, 4)