build generalized suffix tree