Design a Recoverable Iterator | xAI Coding Question