/**
 * Given two lists of integers [lst1] and [lst2], the function breaks out of a loop
 * when a pair of integers from [lst1] and [lst2] have a different parity.
 *
 * @param lst1 A list of integers
 * @param lst2 A list of integers
 * @return The sum of the integers in [lst1] and [lst2] up to the point where the parity differs,
 *         or -1 if no pair is found with different parity in the lists.
 */
fun breakOutLoopXor(lst1: List<Int>, lst2: List<Int>): Int {

    var res = 0
    for (i in 0 until minOf(lst1.size, lst2.size)) {
        if (lst1[i] % 2 != lst2[i] % 2) {
            break
        }
        res += lst1[i] + lst2[i]
    }
    return if (res == 0) -1 else res
}
/**
 * Given two lists of integers [lst1] and [lst2], the function breaks out of a loop
 * when a pair of integers from [lst1] and [lst2] have a different parity.
 *
 * @param lst1 A list of integers
 * @param lst2 A list of integers
 * @return The sum of the integers in [lst1] and [lst2] up to the point where the parity differs,
 *         or -1 if no pair is found with different parity in the lists.
 */
fun breakOutLoopXor(lst1: List<Int>, lst2: List<Int>): Int {
/**
 * Given two lists of integers [lst1] and [lst2], the function breaks out of a loop
 * when a pair of integers from [lst1] and [lst2] have a different parity.
 *
 * @param lst1 A list of integers
 * @param lst2 A list of integers
 * @return The sum of the integers in [lst1] and [lst2] up to the point where the parity differs,
 *         or -1 if no pair is found with different parity in the lists.
 */
fun breakOutLoopXor(lst1: List<Int>, lst2: List<Int>): Int {

    var res = 0
    for (i in 0 until minOf(lst1.size, lst2.size)) {
        if (lst1[i] % 2 != lst2[i] % 2) {
            break
        }
        res += lst1[i] + lst2[i]
    }
    return if (res == 0) -1 else res
}