Fix off by one error in Ukkonen algorithm. Now solves http://imcs.dvfu.ru/cats/static/problem_text-cpid-939661.html