Insert longest common prefix