static void preprocess(char[] p) {
		int i = 0, j = -1, m = p.length;
		b = new int[p.length + 1];
		b[0] = -1;
		while (i < m) {
			while (j >= 0 && p[i] != p[j])
				j = b[j];
			b[++i] = ++j;
		}
	}