manacher sem preprocess