/**
 * Given a set of stars in the sky and a set of observations made by an astronomer,
 * update the observations set to include only the stars that are present in the
 * sky.
 *
 * @param sky Set containing the stars present in the sky.
 * @param observations Set containing the observed stars.
 * @return Updated set containing only the observed stars that are present in the sky.
 */
fun updateObservations(sky: Set<String>, observations: Set<String>): Set<String> {

    val updatedObservations = mutableSetOf<String>()

    // Iterate over each observed star
    for (observedStar in observations) {
        // Check if the observed star is present in the sky
        if (observedStar in sky) {
            // Add the observed star to the updated observations
            updatedObservations.add(observedStar)
        }
    }

    return updatedObservations
}
/**
 * Given a set of stars in the sky and a set of observations made by an astronomer,
 * update the observations set to include only the stars that are present in the
 * sky.
 *
 * @param sky Set containing the stars present in the sky.
 * @param observations Set containing the observed stars.
 * @return Updated set containing only the observed stars that are present in the sky.
 */
fun updateObservations(sky: Set<String>, observations: Set<String>): Set<String> {
/**
 * Given a set of stars in the sky and a set of observations made by an astronomer,
 * update the observations set to include only the stars that are present in the
 * sky.
 *
 * @param sky Set containing the stars present in the sky.
 * @param observations Set containing the observed stars.
 * @return Updated set containing only the observed stars that are present in the sky.
 */
fun updateObservations(sky: Set<String>, observations: Set<String>): Set<String> {

    val updatedObservations = mutableSetOf<String>()

    // Iterate over each observed star
    for (observedStar in observations) {
        // Check if the observed star is present in the sky
        if (observedStar in sky) {
            // Add the observed star to the updated observations
            updatedObservations.add(observedStar)
        }
    }

    return updatedObservations
}