Grasshopper And the String

CodeForces - 733A