/**
 * Given a 2D list of integers 'data', an index 'index' and a value 'value', modify the elements of 'data' using indexing to set the 'value' at the given 'index' for each inner list.
 *
 * Example:
 * modifyElements(listOf(listOf(1, 2, 3), listOf(4, 5, 6), listOf(7, 8, 9)), 1, 0)
 *
 * Output:
 * [[1, 0, 3], [4, 0, 6], [7, 0, 9]]
 */
fun modifyElements(data: List<MutableList<Int>>, index: Int, value: Int): List<MutableList<Int>> {

    for (innerList in data) {
        innerList[index] = value
    }
    return data
}
/**
 * Given a 2D list of integers 'data', an index 'index' and a value 'value', modify the elements of 'data' using indexing to set the 'value' at the given 'index' for each inner list.
 *
 * Example:
 * modifyElements(listOf(listOf(1, 2, 3), listOf(4, 5, 6), listOf(7, 8, 9)), 1, 0)
 *
 * Output:
 * [[1, 0, 3], [4, 0, 6], [7, 0, 9]]
 */
fun modifyElements(data: List<MutableList<Int>>, index: Int, value: Int): List<MutableList<Int>> {
/**
 * Given a 2D list of integers 'data', an index 'index' and a value 'value', modify the elements of 'data' using indexing to set the 'value' at the given 'index' for each inner list.
 *
 * Example:
 * modifyElements(listOf(listOf(1, 2, 3), listOf(4, 5, 6), listOf(7, 8, 9)), 1, 0)
 *
 * Output:
 * [[1, 0, 3], [4, 0, 6], [7, 0, 9]]
 */
fun modifyElements(data: List<MutableList<Int>>, index: Int, value: Int): List<MutableList<Int>> {

    for (innerList in data) {
        innerList[index] = value
    }
    return data
}