Process the characters of a string one at a time. After reading each character, report the first character so far that has appeared exactly once, or '#' if there is none. Return the concatenation of these answers, one per character. The input is JSON {stream}.
Input: JSON {stream}.
Output: String — the answers, one character per position.
Input: {"stream":"aabc"}
Output: a#bb
Explanation: After a: a; after aa: none; after aab: b; after aabc: b.Input: {"stream":"aabbcc"}
Output: a#b#c#
Explanation: Each pair cancels the front.Input: {"stream":"z"}
Output: z
Explanation: Single unique character.0<=|s|<=10^5lowercase letters