/**
 * Create a nested list with 'n' sublists, each containing 'm' elements, all initialized with 'initialValue'.
 *
 * @param n The number of sublists.
 * @param m The number of elements in each sublist.
 * @param initialValue The initial value with which all elements are initialized.
 * @return The nested list with initial values.
 *
 * Example:
 * createNestedListWithInitialValues(3, 4, 0) -> [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
 * createNestedListWithInitialValues(2, 3, 'a') -> [['a', 'a', 'a'], ['a', 'a', 'a']]
 */
fun createNestedListWithInitialValues(n: Int, m: Int, initialValue: Any): List<List<Any>> {

    val nestedList = List(n) { List(m) { initialValue } }
    return nestedList
}
/**
 * Create a nested list with 'n' sublists, each containing 'm' elements, all initialized with 'initialValue'.
 *
 * @param n The number of sublists.
 * @param m The number of elements in each sublist.
 * @param initialValue The initial value with which all elements are initialized.
 * @return The nested list with initial values.
 *
 * Example:
 * createNestedListWithInitialValues(3, 4, 0) -> [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
 * createNestedListWithInitialValues(2, 3, 'a') -> [['a', 'a', 'a'], ['a', 'a', 'a']]
 */
fun createNestedListWithInitialValues(n: Int, m: Int, initialValue: Any): List<List<Any>> {
/**
 * Create a nested list with 'n' sublists, each containing 'm' elements, all initialized with 'initialValue'.
 *
 * @param n The number of sublists.
 * @param m The number of elements in each sublist.
 * @param initialValue The initial value with which all elements are initialized.
 * @return The nested list with initial values.
 *
 * Example:
 * createNestedListWithInitialValues(3, 4, 0) -> [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
 * createNestedListWithInitialValues(2, 3, 'a') -> [['a', 'a', 'a'], ['a', 'a', 'a']]
 */
fun createNestedListWithInitialValues(n: Int, m: Int, initialValue: Any): List<List<Any>> {

    val nestedList = List(n) { List(m) { initialValue } }
    return nestedList
}