/**
 * This exercise involves performing tuple concatenation, repeating, left shift, and right shift operations.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @param n The number of repetitions for the tuple concatenation.
 * @return The result after performing the operations.
 */
fun tupleOperations(t1: List<Any>, t2: List<Any>, n: Int): List<Any> {

    // Concatenate t2 to t1
    var result = t1 + t2

    // Repeat the concatenated tuple n times
    repeat(n - 1) {
        result += t1 + t2
    }

    // Perform left shift operation by dividing the length of the result by 2
    result = result.subList(result.size / 2, result.size) + result.subList(0, result.size / 2)

    // Perform right shift operation by multiplying the length of the result by 3
    result = result.subList(result.size * 3 / 4, result.size) + result.subList(0, result.size * 3 / 4)

    return result
}
/**
 * This exercise involves performing tuple concatenation, repeating, left shift, and right shift operations.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @param n The number of repetitions for the tuple concatenation.
 * @return The result after performing the operations.
 */
fun tupleOperations(t1: List<Any>, t2: List<Any>, n: Int): List<Any> {
/**
 * This exercise involves performing tuple concatenation, repeating, left shift, and right shift operations.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @param n The number of repetitions for the tuple concatenation.
 * @return The result after performing the operations.
 */
fun tupleOperations(t1: List<Any>, t2: List<Any>, n: Int): List<Any> {

    // Concatenate t2 to t1
    var result = t1 + t2

    // Repeat the concatenated tuple n times
    repeat(n - 1) {
        result += t1 + t2
    }

    // Perform left shift operation by dividing the length of the result by 2
    result = result.subList(result.size / 2, result.size) + result.subList(0, result.size / 2)

    // Perform right shift operation by multiplying the length of the result by 3
    result = result.subList(result.size * 3 / 4, result.size) + result.subList(0, result.size * 3 / 4)

    return result
}