Given a set of requirements, design a data structure that allows for efficient retrieval and updates.
Implement process_operations(operations). Each operation is a list: ['set', key, value], ['get', key], ['delete', key], or ['kth', rank]. Maintain unique integer keys and support updates to existing keys. Return an output for every operation except set: get returns its value or None, delete returns None, and kth returns the key with the zero-based rank or None when the rank is invalid. All operations should be efficient; do not sort all keys for each kth request.
Constraints: at most 500 operations, integer keys and values, and ranks may be negative or out of range.
def process_operations(operations):