Lyndon decomposition & Duval (e-maxx.ru)