This problem is classified as advanced, but - in my opinion - it is not so difficult once you realize how to determine the substring A. To find the substring A, we start moving from position 1, from ...