Write a data structure that supports append(x), flip(), and delete(x) which removes all occurrences of integer x.
Implement process_operations(operations), where each operation is ['append', x], ['flip'], or ['delete', x]. Return the final sequence from left to right after processing all operations. flip() reverses the logical order, and the implementation should make it an O(1) operation.
def process_operations(operations):