The text is given. A word is considered a sequence of non-space characters. Words are separated by one or more spaces. For each word from this text find the index of its previous appearance in the text. The index of the first word is 00. If a word occur the first time print -1−1.
Input format: Text is supplied to the input. The input ends with an empty line.
Спасибо за сотрудничество! Надеюсь на продолжение. У автора редкое сочетание 3-х параметров: скорость, качество, разумная цена. Отдельно выделю очень хорошее оформление. Спасибо за ваши труды и ваш прекрасный и неповторимый профессионализм!