Kmp
a b c a a b b a b c a b a a c b a c b a
maxL: 0 0 0 1 1 2 0 1 2 3 4 2 1 1 0 0 1 0 0 1
-1 0 0 0 1 1 2 0 1 2 3 4 2 1 1 0 0 1 0 0 1
next: 0 1 1 1 2 2 3 1 2 3 4 5 3 2 2 1 1 2 1 1
nextval 0 1 1 0 2 0 3 0 0 0 0 5 0 2 2 1 0 2 1 0