/**
 * Given a list of designs and a list of new designs, append the new designs to the original list using negative indexing.
 * The negative indexing will allow the new designs to be added at the end of the list.
 *
 * @param designs The original list of designs.
 * @param newDesigns The list of new designs to be appended.
 * @return The updated list of designs with the new designs appended at the end.
 */
fun appendNegativeDesigns(designs: MutableList<String>, newDesigns: List<String>): MutableList<String> {

    // Find the length of the original list of designs
    val length = designs.size

    // Use negative indices to append each new design to the original list
    for (i in newDesigns.indices) {
        designs.add(newDesigns[i])
        designs[length + i] = designs[length + i].also { designs[length + i] = designs[designs.size - 1 - i] }
    }

    return designs
}
/**
 * Given a list of designs and a list of new designs, append the new designs to the original list using negative indexing.
 * The negative indexing will allow the new designs to be added at the end of the list.
 *
 * @param designs The original list of designs.
 * @param newDesigns The list of new designs to be appended.
 * @return The updated list of designs with the new designs appended at the end.
 */
fun appendNegativeDesigns(designs: MutableList<String>, newDesigns: List<String>): MutableList<String> {
/**
 * Given a list of designs and a list of new designs, append the new designs to the original list using negative indexing.
 * The negative indexing will allow the new designs to be added at the end of the list.
 *
 * @param designs The original list of designs.
 * @param newDesigns The list of new designs to be appended.
 * @return The updated list of designs with the new designs appended at the end.
 */
fun appendNegativeDesigns(designs: MutableList<String>, newDesigns: List<String>): MutableList<String> {

    // Find the length of the original list of designs
    val length = designs.size

    // Use negative indices to append each new design to the original list
    for (i in newDesigns.indices) {
        designs.add(newDesigns[i])
        designs[length + i] = designs[length + i].also { designs[length + i] = designs[designs.size - 1 - i] }
    }

    return designs
}