/**
 * Given the names of two planets, planet1 and planet2, this function returns a set of common letters between their names.
 *
 * @param planet1 The name of the first planet.
 * @param planet2 The name of the second planet.
 * @return A set containing the common letters between planet1 and planet2.
 */
fun findCommonLetters(planet1: String, planet2: String): Set<Char> {

    val commonLetters = mutableSetOf<Char>()

    for (letter1 in planet1) {
        if (letter1 !in commonLetters) {
            for (letter2 in planet2) {
                if (letter1 == letter2) {
                    commonLetters.add(letter1)
                    break
                }
            }
        }
    }

    return commonLetters
}
/**
 * Given the names of two planets, planet1 and planet2, this function returns a set of common letters between their names.
 *
 * @param planet1 The name of the first planet.
 * @param planet2 The name of the second planet.
 * @return A set containing the common letters between planet1 and planet2.
 */
fun findCommonLetters(planet1: String, planet2: String): Set<Char> {
/**
 * Given the names of two planets, planet1 and planet2, this function returns a set of common letters between their names.
 *
 * @param planet1 The name of the first planet.
 * @param planet2 The name of the second planet.
 * @return A set containing the common letters between planet1 and planet2.
 */
fun findCommonLetters(planet1: String, planet2: String): Set<Char> {

    val commonLetters = mutableSetOf<Char>()

    for (letter1 in planet1) {
        if (letter1 !in commonLetters) {
            for (letter2 in planet2) {
                if (letter1 == letter2) {
                    commonLetters.add(letter1)
                    break
                }
            }
        }
    }

    return commonLetters
}