Mr Sythe is teaching an ESL class about letters that repeat inside English words. As an exercise, his students replace every repeated letter in a word with a symbol.
The symbols are:
* — the first repeated letter (the first letter encountered that has appeared before)? — the second repeated letter/ — the third repeated letter+ — the fourth repeated letter! — the fifth repeated letterNo word Mr Sythe uses has more than 5 repeated letters.
Letters are compared case-insensitively. The first time a letter appears it is left unchanged; every later appearance of that letter is replaced by the symbol assigned to it. Symbols are assigned in the order in which each distinct letter first becomes repeated: *, then ?, /, +, !.
For example, the word Reindeer becomes Reind**?, because e is repeated twice and r is repeated once. The repeated e comes before the repeated r, so e is assigned * and r is assigned ?. The first letter of the word is an upper case R, but it is treated as the same letter as lower case r.
The input is a list of words, one per line. Each word begins with an upper case letter and contains no more than 10 letters. The last line contains just a # — do not process this line.
Print one line for each input word. Each output word is the input word with its repeated letters replaced according to the rules above.