regroup Longest_Common_Prefix