This editorial problem E1, Erase and Extend, can someone please give a logical explanation as to how the optimal string is supposed to be a repetition of a prefix? The editorial takes a lot of leaps and the comments do not have any explanation. Thanks. (Ask me for further clarification if needed)