/**
 * Given a dictionary where the keys are integers and the values are lists of integers, find the sum of unique integers present in all the lists.
 *
 * @param dictionary A dictionary where the keys are integers and the values are lists of integers.
 * @return The sum of unique integers present in all the lists.
 */
fun findUniqueSum(dictionary: Map<Int, List<Int>>): Int {

    val uniqueIntegers = mutableSetOf<Int>()
    for (lst in dictionary.values) {
        uniqueIntegers.addAll(lst)
    }

    var sumOfUniqueIntegers = 0
    for (num in uniqueIntegers) {
        var foundInAllLists = true
        for (lst in dictionary.values) {
            if (num !in lst) {
                foundInAllLists = false
                break
            }
        }
        if (foundInAllLists) {
            sumOfUniqueIntegers += num
        }
    }

    return sumOfUniqueIntegers
}
/**
 * Given a dictionary where the keys are integers and the values are lists of integers, find the sum of unique integers present in all the lists.
 *
 * @param dictionary A dictionary where the keys are integers and the values are lists of integers.
 * @return The sum of unique integers present in all the lists.
 */
fun findUniqueSum(dictionary: Map<Int, List<Int>>): Int {
/**
 * Given a dictionary where the keys are integers and the values are lists of integers, find the sum of unique integers present in all the lists.
 *
 * @param dictionary A dictionary where the keys are integers and the values are lists of integers.
 * @return The sum of unique integers present in all the lists.
 */
fun findUniqueSum(dictionary: Map<Int, List<Int>>): Int {

    val uniqueIntegers = mutableSetOf<Int>()
    for (lst in dictionary.values) {
        uniqueIntegers.addAll(lst)
    }

    var sumOfUniqueIntegers = 0
    for (num in uniqueIntegers) {
        var foundInAllLists = true
        for (lst in dictionary.values) {
            if (num !in lst) {
                foundInAllLists = false
                break
            }
        }
        if (foundInAllLists) {
            sumOfUniqueIntegers += num
        }
    }

    return sumOfUniqueIntegers
}