/**
 * Returns a set of common notes between two musicians.
 *
 * @param musician1 Set of notes played by musician 1
 * @param musician2 Set of notes played by musician 2
 * @return Set of common notes between the two musicians
 *
 * Example:
 * musician1 = setOf('C', 'D', 'E', 'F', 'G')
 * musician2 = setOf('D', 'E', 'F', 'G', 'A')
 * getCommonNotes(musician1, musician2) -> setOf('D', 'E', 'F', 'G')
 */
fun getCommonNotes(musician1: Set<String>, musician2: Set<String>): Set<String> {

    val commonNotes = mutableSetOf<String>()
    for (note in musician1) {
        if (note in musician2) {
            commonNotes.add(note)
        }
    }
    return commonNotes
}
/**
 * Returns a set of common notes between two musicians.
 *
 * @param musician1 Set of notes played by musician 1
 * @param musician2 Set of notes played by musician 2
 * @return Set of common notes between the two musicians
 *
 * Example:
 * musician1 = setOf('C', 'D', 'E', 'F', 'G')
 * musician2 = setOf('D', 'E', 'F', 'G', 'A')
 * getCommonNotes(musician1, musician2) -> setOf('D', 'E', 'F', 'G')
 */
fun getCommonNotes(musician1: Set<String>, musician2: Set<String>): Set<String> {
/**
 * Returns a set of common notes between two musicians.
 *
 * @param musician1 Set of notes played by musician 1
 * @param musician2 Set of notes played by musician 2
 * @return Set of common notes between the two musicians
 *
 * Example:
 * musician1 = setOf('C', 'D', 'E', 'F', 'G')
 * musician2 = setOf('D', 'E', 'F', 'G', 'A')
 * getCommonNotes(musician1, musician2) -> setOf('D', 'E', 'F', 'G')
 */
fun getCommonNotes(musician1: Set<String>, musician2: Set<String>): Set<String> {

    val commonNotes = mutableSetOf<String>()
    for (note in musician1) {
        if (note in musician2) {
            commonNotes.add(note)
        }
    }
    return commonNotes
}