Problem G
String Stretching
Start with a string
For example, suppose
-
hello
-
hhelloello
-
hhelloelhellolo
-
hhehellolloelhellolo
So, after 5 steps, the string
Given the final string
Input
Each input will consist of a single test case. Note that
your program may be run multiple times on different inputs.
Each input consists of a single line with a single string
Output
Output a single line with the string
Sample Input 1 | Sample Output 1 |
---|---|
hhehellolloelhellolo |
hello |