/**
 * Modify the given list of stars by replacing the star at the specified index with the given value.
 *
 * @param starsList a list of stars
 * @param index the index at which the star needs to be replaced
 * @param value the new value to replace the star with
 * @return The modified list of stars
 *
 * Example:
 * modifyStars(listOf("Sirius", "Betegeuse", "Proxima Centauri"), 1, "Alpha Centauri")
 * Output: ['Sirius', 'Alpha Centauri', 'Proxima Centauri']
 */
fun modifyStars(starsList: MutableList<String>, index: Int, value: String): List<String> {

    for (i in starsList.indices) {
        if (i == index) {
            starsList[i] = value
        }
    }
    return starsList
}
/**
 * Modify the given list of stars by replacing the star at the specified index with the given value.
 *
 * @param starsList a list of stars
 * @param index the index at which the star needs to be replaced
 * @param value the new value to replace the star with
 * @return The modified list of stars
 *
 * Example:
 * modifyStars(listOf("Sirius", "Betegeuse", "Proxima Centauri"), 1, "Alpha Centauri")
 * Output: ['Sirius', 'Alpha Centauri', 'Proxima Centauri']
 */
fun modifyStars(starsList: MutableList<String>, index: Int, value: String): List<String> {
/**
 * Modify the given list of stars by replacing the star at the specified index with the given value.
 *
 * @param starsList a list of stars
 * @param index the index at which the star needs to be replaced
 * @param value the new value to replace the star with
 * @return The modified list of stars
 *
 * Example:
 * modifyStars(listOf("Sirius", "Betegeuse", "Proxima Centauri"), 1, "Alpha Centauri")
 * Output: ['Sirius', 'Alpha Centauri', 'Proxima Centauri']
 */
fun modifyStars(starsList: MutableList<String>, index: Int, value: String): List<String> {

    for (i in starsList.indices) {
        if (i == index) {
            starsList[i] = value
        }
    }
    return starsList
}