Repeated string - MarisaOJ: Marisa Online Judge

Repeated string

Time limit: 1000 ms
Memory limit: 256 MB
Given a string $S$ of length $n$ that contains only lowercase English characters. Find the shortest string $T$ so that if you write $T$ repeatedly until $n$ characters have been written, you will have the string $S$. ### Input - A single line containing a string $S$. ### Output - Print $T$. ### Constraints - $1 \le |S| \le 10^5$. ### Example Input: ``` sussussu ``` Output: ``` sus ```