/**
 * This function creates a list of a given size with initial elements.
 *
 * @param size The size of the list to be created.
 * @param initialValue The initial value to fill each element of the list.
 * @return A list of the given size with all elements initialized to the initial value.
 */
fun createListWithInitialElements(size: Int, initialValue: Char): List<List<Char>> {

    val result = mutableListOf<List<Char>>()

    repeat(size) {
        val sublist = MutableList(size) { initialValue }
        result.add(sublist)
    }

    return result
}

// Example usage
/**
 * This function creates a list of a given size with initial elements.
 *
 * @param size The size of the list to be created.
 * @param initialValue The initial value to fill each element of the list.
 * @return A list of the given size with all elements initialized to the initial value.
 */
fun createListWithInitialElements(size: Int, initialValue: Char): List<List<Char>> {
/**
 * This function creates a list of a given size with initial elements.
 *
 * @param size The size of the list to be created.
 * @param initialValue The initial value to fill each element of the list.
 * @return A list of the given size with all elements initialized to the initial value.
 */
fun createListWithInitialElements(size: Int, initialValue: Char): List<List<Char>> {

    val result = mutableListOf<List<Char>>()

    repeat(size) {
        val sublist = MutableList(size) { initialValue }
        result.add(sublist)
    }

    return result
}

// Example usage