Create longest common prefix