/**
 * Given a list of tuples and an integer index, the function returns a list of elements at the negative index position of each tuple.
 *
 * @param tuples A list of tuples.
 * @param index The negative index value.
 * @return A list of elements located at the negative index position of each tuple.
 *
 * Example:
 * findNegativeIndices(listOf(1, 2, 3), listOf('a', 'b', 'c'), listOf(true, false, true), -1)
 * Output: [3, 'c', true]
 */
fun findNegativeIndices(tuples: List<List<Any>>, index: Int): List<Any> {

    return tuples.map { it[-index] }
}
/**
 * Given a list of tuples and an integer index, the function returns a list of elements at the negative index position of each tuple.
 *
 * @param tuples A list of tuples.
 * @param index The negative index value.
 * @return A list of elements located at the negative index position of each tuple.
 *
 * Example:
 * findNegativeIndices(listOf(1, 2, 3), listOf('a', 'b', 'c'), listOf(true, false, true), -1)
 * Output: [3, 'c', true]
 */
fun findNegativeIndices(tuples: List<List<Any>>, index: Int): List<Any> {
/**
 * Given a list of tuples and an integer index, the function returns a list of elements at the negative index position of each tuple.
 *
 * @param tuples A list of tuples.
 * @param index The negative index value.
 * @return A list of elements located at the negative index position of each tuple.
 *
 * Example:
 * findNegativeIndices(listOf(1, 2, 3), listOf('a', 'b', 'c'), listOf(true, false, true), -1)
 * Output: [3, 'c', true]
 */
fun findNegativeIndices(tuples: List<List<Any>>, index: Int): List<Any> {

    return tuples.map { it[-index] }
}