/**
 * Modify the given art by adding two new elements to the intersection of 'x' and 'y' coordinates.
 *
 * @param x List of 'x' coordinates
 * @param y List of 'y' coordinates
 * @param art List of strings representing the art
 * @return Modified art with new elements added to the intersection coordinates
 */
fun modifyArt(x: List<Int>, y: List<Int>, art: List<String>): List<String> {

    // Find the intersection of 'x' and 'y' coordinates
    val intersection = x.intersect(y)

    // If the intersection is empty, return the original art as is
    if (intersection.isEmpty()) {
        return art
    }

    // Create a new list to store the modified art
    val modifiedArt = mutableListOf<String>()

    // Iterate over each row in the art
    for (row in art) {
        var modifiedRow = ""
        for ((col, char) in row.withIndex()) {
            // Check if the current coordinates are in the intersection
            if (col in intersection) {
                // Append two new elements to the intersection
                modifiedRow += "$char<>"
            }

            // Append the original character to the modified row
            modifiedRow += char
        }
        // Append the modified row
        modifiedArt.add(modifiedRow)
    }

    return modifiedArt
}
/**
 * Modify the given art by adding two new elements to the intersection of 'x' and 'y' coordinates.
 *
 * @param x List of 'x' coordinates
 * @param y List of 'y' coordinates
 * @param art List of strings representing the art
 * @return Modified art with new elements added to the intersection coordinates
 */
fun modifyArt(x: List<Int>, y: List<Int>, art: List<String>): List<String> {
/**
 * Modify the given art by adding two new elements to the intersection of 'x' and 'y' coordinates.
 *
 * @param x List of 'x' coordinates
 * @param y List of 'y' coordinates
 * @param art List of strings representing the art
 * @return Modified art with new elements added to the intersection coordinates
 */
fun modifyArt(x: List<Int>, y: List<Int>, art: List<String>): List<String> {

    // Find the intersection of 'x' and 'y' coordinates
    val intersection = x.intersect(y)

    // If the intersection is empty, return the original art as is
    if (intersection.isEmpty()) {
        return art
    }

    // Create a new list to store the modified art
    val modifiedArt = mutableListOf<String>()

    // Iterate over each row in the art
    for (row in art) {
        var modifiedRow = ""
        for ((col, char) in row.withIndex()) {
            // Check if the current coordinates are in the intersection
            if (col in intersection) {
                // Append two new elements to the intersection
                modifiedRow += "$char<>"
            }

            // Append the original character to the modified row
            modifiedRow += char
        }
        // Append the modified row
        modifiedArt.add(modifiedRow)
    }

    return modifiedArt
}