/**
 * Given two sets of personality traits, identify the common traits between them.
 * Return a list of the common traits.
 *
 * @param traits1 The first set of personality traits.
 * @param traits2 The second set of personality traits.
 * @return A list of the common personality traits between traits1 and traits2.
 */
fun comparePersonalityTraits(traits1: Set<String>, traits2: Set<String>): List<String> {

    val commonTraits = mutableListOf<String>() // Initialize an empty list to store the common traits

    for (trait1 in traits1) {
        for (trait2 in traits2) {
            if (trait1 == trait2) { // Compare each trait from traits1 with all traits from traits2
                commonTraits.add(trait1) // Add the common trait to the commonTraits list
            }
        }
    }

    return commonTraits
}
/**
 * Given two sets of personality traits, identify the common traits between them.
 * Return a list of the common traits.
 *
 * @param traits1 The first set of personality traits.
 * @param traits2 The second set of personality traits.
 * @return A list of the common personality traits between traits1 and traits2.
 */
fun comparePersonalityTraits(traits1: Set<String>, traits2: Set<String>): List<String> {
/**
 * Given two sets of personality traits, identify the common traits between them.
 * Return a list of the common traits.
 *
 * @param traits1 The first set of personality traits.
 * @param traits2 The second set of personality traits.
 * @return A list of the common personality traits between traits1 and traits2.
 */
fun comparePersonalityTraits(traits1: Set<String>, traits2: Set<String>): List<String> {

    val commonTraits = mutableListOf<String>() // Initialize an empty list to store the common traits

    for (trait1 in traits1) {
        for (trait2 in traits2) {
            if (trait1 == trait2) { // Compare each trait from traits1 with all traits from traits2
                commonTraits.add(trait1) // Add the common trait to the commonTraits list
            }
        }
    }

    return commonTraits
}