/**
 * This function takes three sets of legal cases as input and returns the common cases present in all sets.
 *
 * @param caseSet1 Set of legal cases for the first scenario.
 * @param caseSet2 Set of legal cases for the second scenario.
 * @param caseSet3 Set of legal cases for the third scenario.
 * @return Set containing the common legal cases present in all three scenarios.
 */
fun getCommonCases(caseSet1: Set<String>, caseSet2: Set<String>, caseSet3: Set<String>): Set<String> {

    val commonCases = mutableSetOf<String>()

    for (case in caseSet1) {
        if (case in caseSet2 || case in caseSet3) {
            // Add the case to the commonCases set if it is present in both sets
            commonCases.add(case)
        }
    }

    return commonCases
}
/**
 * This function takes three sets of legal cases as input and returns the common cases present in all sets.
 *
 * @param caseSet1 Set of legal cases for the first scenario.
 * @param caseSet2 Set of legal cases for the second scenario.
 * @param caseSet3 Set of legal cases for the third scenario.
 * @return Set containing the common legal cases present in all three scenarios.
 */
fun getCommonCases(caseSet1: Set<String>, caseSet2: Set<String>, caseSet3: Set<String>): Set<String> {
/**
 * This function takes three sets of legal cases as input and returns the common cases present in all sets.
 *
 * @param caseSet1 Set of legal cases for the first scenario.
 * @param caseSet2 Set of legal cases for the second scenario.
 * @param caseSet3 Set of legal cases for the third scenario.
 * @return Set containing the common legal cases present in all three scenarios.
 */
fun getCommonCases(caseSet1: Set<String>, caseSet2: Set<String>, caseSet3: Set<String>): Set<String> {

    val commonCases = mutableSetOf<String>()

    for (case in caseSet1) {
        if (case in caseSet2 || case in caseSet3) {
            // Add the case to the commonCases set if it is present in both sets
            commonCases.add(case)
        }
    }

    return commonCases
}