~/algor $ cat problems/navbat-birinchi-yagona-harf
First unique letter in a stream
Medium
1000 ms
128 MB
66%
Lowercase Latin letters arrive one at a time; together they form the string $s$. After each letter arrives, determine which of the letters that have occurred exactly once so far arrived first; if there is no such letter, write -. Print the answers as one string.
Input
One line with the string $s$.
Output
A string of $|s|$ characters (letters or -).
Note
$1 \le |s| \le 10^{5}$
$s$ consists of lowercase Latin letters
Examples
Input #1
aabcbd
Output #1
a-bbcc
Input #2
z
Output #2
z