Longest Common Pattern - testcase generator