Welp, we added a modified version of Ukkonen's algorithm. Not sure
whether it will work.