/**
 * Given two lists of numbers, find the intersection of the lists and break out of the loop once a common number is found.
 */
fun intersectAndBreak(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()
    
    for (num1 in numbers1) {
        for (num2 in numbers2) {
            if (num1 == num2) {
                intersection.add(num1)
                break // Break out of the inner loop once a common number is found
            }
        }
    }
    
    return intersection
}
/**
 * Given two lists of numbers, find the intersection of the lists and break out of the loop once a common number is found.
 */
fun intersectAndBreak(numbers1: List<Int>, numbers2: List<Int>): List<Int> {
/**
 * Given two lists of numbers, find the intersection of the lists and break out of the loop once a common number is found.
 */
fun intersectAndBreak(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()
    
    for (num1 in numbers1) {
        for (num2 in numbers2) {
            if (num1 == num2) {
                intersection.add(num1)
                break // Break out of the inner loop once a common number is found
            }
        }
    }
    
    return intersection
}