void MakeNext(int* P,int M,int* Next){ Next[0] = -1; int i = 0, j = -1; while(i