11988 - Broken Keyboard (a.k.a. Beiju Text) - Time limit exceeded(Java)