A string w is said to be a Lyndon word if w is lexicographically smaller than any of its cyclic rotations.
The longest Lyndon substring of a string s is the longest substring of s which is a Lyndon word.
Chiaki has n strings s1,s2,…,sn. She has some queries: for some pair (i,j), find the length of the longest Lyndon substring of string sisj.