Find max common string at the beginning