The first line contains two integer n and m, which indicate the length of the set of codes and the length of Original Recipe discount code. (1<=n<=1000000, 1<=m<=1000)
The second line is the set of codes.
The third line is the Original Recipe discount code.
15 2 lanranlanranlan an
If you cut out a code, then this part of code should not be used again. Remember to adjust your KMP algorithm for this.