Solve the merging map problem.