/**
 * Given two tuples t1 and t2, with integer values, concatenate the elements at the specified indices.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @param index1 The index of the element in t1.
 * @param index2 The index of the element in t2.
 * @return A string concatenating the two elements.
 */
fun concatenateTuples(t1: List<Int>, t2: List<Int>, index1: Int, index2: Int): String {

    return try {
        val element1 = t1[index1]
        val element2 = t2[index2]
        val result = element1.toString() + element2.toString()
        result
    } catch (e: IndexOutOfBoundsException) {
        "Index out of range! Please provide valid indices."
    }
}
/**
 * Given two tuples t1 and t2, with integer values, concatenate the elements at the specified indices.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @param index1 The index of the element in t1.
 * @param index2 The index of the element in t2.
 * @return A string concatenating the two elements.
 */
fun concatenateTuples(t1: List<Int>, t2: List<Int>, index1: Int, index2: Int): String {
/**
 * Given two tuples t1 and t2, with integer values, concatenate the elements at the specified indices.
 *
 * @param t1 The first tuple.
 * @param t2 The second tuple.
 * @param index1 The index of the element in t1.
 * @param index2 The index of the element in t2.
 * @return A string concatenating the two elements.
 */
fun concatenateTuples(t1: List<Int>, t2: List<Int>, index1: Int, index2: Int): String {

    return try {
        val element1 = t1[index1]
        val element2 = t2[index2]
        val result = element1.toString() + element2.toString()
        result
    } catch (e: IndexOutOfBoundsException) {
        "Index out of range! Please provide valid indices."
    }
}