| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 65 | 45 | 38 | 79.167% |
In order to make his lessons more entertaining, one computer science teacher has invented a funny exercise.
During the exercise the teacher consequently writes out the letters of some word he had just thought of at the blackboard. Students' task is to shout <<Wipe it!>> every time the word written at the blackboard has some suffix which has already occurred at some other location in the word.
The moment the teacher hears the shout, he wipes off the suffix students has found and goes on writing out remaining letters.
Given the word the teacher has thought of and assuming students perfectly fulfil their task, find out the word that would be written on the blackboard in the end of the exercise.
The input file contains a single line --- the word teacher thought of. It consists of lowercase English letters and it's length does not exceed 1000ドル$ characters.
Output a single line --- the word that would be written at the blackboard at the end of the exercise.
abcabc
abc
aaaaaaaa
a