/**
 * This exercise requires concatenating two tuples and then repeating the resulting tuple a certain number of times.
 * The task is to modify the given code so that it breaks out of the loop if the result contains a specific element.
 *
 * @param tuple1 A tuple of elements
 * @param tuple2 A tuple of elements
 * @param repeatCount An integer representing the number of times the resulting tuple should be repeated
 * @return The resulting tuple after concatenation and repetition
 */
fun concatenateAndRepeat(tuple1: List<String>, tuple2: List<String>, repeatCount: Int): List<String> {

    val result = tuple1 + tuple2  // Concatenate tuple1 and tuple2

    // Repeat the resulting tuple repeatCount number of times
    var repeatedTuple = emptyList<String>()
    var count = repeatCount
    while (count > 0) {
        repeatedTuple += result
        count--
    }

    // Check if the resulting tuple contains the element "Firefighter"
    // If it does, break out of the loop
    for (element in repeatedTuple) {
        if (element == "Firefighter") {
            break
        }
    }

    return repeatedTuple
}
/**
 * This exercise requires concatenating two tuples and then repeating the resulting tuple a certain number of times.
 * The task is to modify the given code so that it breaks out of the loop if the result contains a specific element.
 *
 * @param tuple1 A tuple of elements
 * @param tuple2 A tuple of elements
 * @param repeatCount An integer representing the number of times the resulting tuple should be repeated
 * @return The resulting tuple after concatenation and repetition
 */
fun concatenateAndRepeat(tuple1: List<String>, tuple2: List<String>, repeatCount: Int): List<String> {
/**
 * This exercise requires concatenating two tuples and then repeating the resulting tuple a certain number of times.
 * The task is to modify the given code so that it breaks out of the loop if the result contains a specific element.
 *
 * @param tuple1 A tuple of elements
 * @param tuple2 A tuple of elements
 * @param repeatCount An integer representing the number of times the resulting tuple should be repeated
 * @return The resulting tuple after concatenation and repetition
 */
fun concatenateAndRepeat(tuple1: List<String>, tuple2: List<String>, repeatCount: Int): List<String> {

    val result = tuple1 + tuple2  // Concatenate tuple1 and tuple2

    // Repeat the resulting tuple repeatCount number of times
    var repeatedTuple = emptyList<String>()
    var count = repeatCount
    while (count > 0) {
        repeatedTuple += result
        count--
    }

    // Check if the resulting tuple contains the element "Firefighter"
    // If it does, break out of the loop
    for (element in repeatedTuple) {
        if (element == "Firefighter") {
            break
        }
    }

    return repeatedTuple
}