/**
 * Astronomer wants to find the moons of a given planet.
 * Write a function that takes a list of pairs where each pair
 * contains the name of a moon and its distance from the planet.
 * The function should return the names of the moons that are at a
 * distance greater than 1000 units from the planet.
 */
fun findMoons(moons: List<Pair<String, Int>>): List<String> {

    val distantMoons = mutableListOf<String>()

    for (moon in moons) {
        if (moon.second > 1000) {
            distantMoons.add(moon.first)
        }
    }

    return distantMoons
}
/**
 * Astronomer wants to find the moons of a given planet.
 * Write a function that takes a list of pairs where each pair
 * contains the name of a moon and its distance from the planet.
 * The function should return the names of the moons that are at a
 * distance greater than 1000 units from the planet.
 */
fun findMoons(moons: List<Pair<String, Int>>): List<String> {
/**
 * Astronomer wants to find the moons of a given planet.
 * Write a function that takes a list of pairs where each pair
 * contains the name of a moon and its distance from the planet.
 * The function should return the names of the moons that are at a
 * distance greater than 1000 units from the planet.
 */
fun findMoons(moons: List<Pair<String, Int>>): List<String> {

    val distantMoons = mutableListOf<String>()

    for (moon in moons) {
        if (moon.second > 1000) {
            distantMoons.add(moon.first)
        }
    }

    return distantMoons
}