IBM Interview Question

How would you remove duplicates from an infinitely long string?