Help me in solving STRINGRA problem

Can someone explain this problem statement
Problem Link: STRINGRA Problem - CodeChef