/**
 * This exercise aims to test your understanding of tuple concatenation and repeating as well as addition in Python.
 * Your task is to complete the code below to concatenate two tuples and repeat them a certain number of times using addition.
 *
 * @param t1 First input tuple
 * @param t2 Second input tuple
 * @param n1 Number of times to repeat the first tuple
 * @param n2 Number of times to repeat the second tuple
 * @return The concatenated and repeated tuple
 *
 * Example:
 * If t1 = (1, 2) and t2 = (3, 4), and n1 = 2, n2 = 3,
 * the output should be (1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4).
 */
fun tupleConcatenationAndRepeating(t1: List<Int>, t2: List<Int>, n1: Int, n2: Int): List<Int> {

    val concatList = t1 + t2
    val repeatedList = (List(n1) { concatList }.flatten() + List(n2) { concatList }.flatten())
    return repeatedList
}
/**
 * This exercise aims to test your understanding of tuple concatenation and repeating as well as addition in Python.
 * Your task is to complete the code below to concatenate two tuples and repeat them a certain number of times using addition.
 *
 * @param t1 First input tuple
 * @param t2 Second input tuple
 * @param n1 Number of times to repeat the first tuple
 * @param n2 Number of times to repeat the second tuple
 * @return The concatenated and repeated tuple
 *
 * Example:
 * If t1 = (1, 2) and t2 = (3, 4), and n1 = 2, n2 = 3,
 * the output should be (1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4).
 */
fun tupleConcatenationAndRepeating(t1: List<Int>, t2: List<Int>, n1: Int, n2: Int): List<Int> {
/**
 * This exercise aims to test your understanding of tuple concatenation and repeating as well as addition in Python.
 * Your task is to complete the code below to concatenate two tuples and repeat them a certain number of times using addition.
 *
 * @param t1 First input tuple
 * @param t2 Second input tuple
 * @param n1 Number of times to repeat the first tuple
 * @param n2 Number of times to repeat the second tuple
 * @return The concatenated and repeated tuple
 *
 * Example:
 * If t1 = (1, 2) and t2 = (3, 4), and n1 = 2, n2 = 3,
 * the output should be (1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4).
 */
fun tupleConcatenationAndRepeating(t1: List<Int>, t2: List<Int>, n1: Int, n2: Int): List<Int> {

    val concatList = t1 + t2
    val repeatedList = (List(n1) { concatList }.flatten() + List(n2) { concatList }.flatten())
    return repeatedList
}