/**
 * Given a list of dancer moves and a move to skip, modify the list by removing the skipped move using indexing.
 *
 * @param dancerMoves List of dancer move strings.
 * @param moveToSkip The move to be skipped.
 * @return Modified list of dancer moves after skipping a certain move.
 */
fun modifyDancerMoves(dancerMoves: MutableList<String>, moveToSkip: String): List<String> {

    // Iterate through the list of dancer moves
    for (i in dancerMoves.indices) {
        // Use indexing to access each move in the list
        val move = dancerMoves[i]
        
        // Check if the current move is the move to skip
        if (move == moveToSkip) {
            // Replace the skipped move with an empty string
            dancerMoves[i] = ""
        }
    }

    // Remove any empty strings from the list
    val modifiedMoves = dancerMoves.filter { it != "" }

    // Return the modified list of dancer moves
    return modifiedMoves
}
/**
 * Given a list of dancer moves and a move to skip, modify the list by removing the skipped move using indexing.
 *
 * @param dancerMoves List of dancer move strings.
 * @param moveToSkip The move to be skipped.
 * @return Modified list of dancer moves after skipping a certain move.
 */
fun modifyDancerMoves(dancerMoves: MutableList<String>, moveToSkip: String): List<String> {
/**
 * Given a list of dancer moves and a move to skip, modify the list by removing the skipped move using indexing.
 *
 * @param dancerMoves List of dancer move strings.
 * @param moveToSkip The move to be skipped.
 * @return Modified list of dancer moves after skipping a certain move.
 */
fun modifyDancerMoves(dancerMoves: MutableList<String>, moveToSkip: String): List<String> {

    // Iterate through the list of dancer moves
    for (i in dancerMoves.indices) {
        // Use indexing to access each move in the list
        val move = dancerMoves[i]
        
        // Check if the current move is the move to skip
        if (move == moveToSkip) {
            // Replace the skipped move with an empty string
            dancerMoves[i] = ""
        }
    }

    // Remove any empty strings from the list
    val modifiedMoves = dancerMoves.filter { it != "" }

    // Return the modified list of dancer moves
    return modifiedMoves
}