/**
 * Given a list of nested tuples representing stars in the night sky,
 * this function returns a list of stars that have a brightness greater than or equal to 9.
 *
 * @param stars A list of nested tuples representing stars in the format (name, brightness).
 * @return A list of star names that have a brightness greater than or equal to 9.
 */
fun findShiningStars(stars: List<Pair<String, Int>>): List<String> {

    // Initialize an empty list to store the names of shining stars
    val shiningStars = mutableListOf<String>()

    // Iterate over each star tuple in the list
    for (star in stars) {
        // Check if the brightness of the star is greater than or equal to 9
        if (star.second >= 9) {
            // Append the name of the shining star to the list
            shiningStars.add(star.first)
        }
    }

    return shiningStars
}
/**
 * Given a list of nested tuples representing stars in the night sky,
 * this function returns a list of stars that have a brightness greater than or equal to 9.
 *
 * @param stars A list of nested tuples representing stars in the format (name, brightness).
 * @return A list of star names that have a brightness greater than or equal to 9.
 */
fun findShiningStars(stars: List<Pair<String, Int>>): List<String> {
/**
 * Given a list of nested tuples representing stars in the night sky,
 * this function returns a list of stars that have a brightness greater than or equal to 9.
 *
 * @param stars A list of nested tuples representing stars in the format (name, brightness).
 * @return A list of star names that have a brightness greater than or equal to 9.
 */
fun findShiningStars(stars: List<Pair<String, Int>>): List<String> {

    // Initialize an empty list to store the names of shining stars
    val shiningStars = mutableListOf<String>()

    // Iterate over each star tuple in the list
    for (star in stars) {
        // Check if the brightness of the star is greater than or equal to 9
        if (star.second >= 9) {
            // Append the name of the shining star to the list
            shiningStars.add(star.first)
        }
    }

    return shiningStars
}