Restore the Permutation by Merger

Problem Name:
Restore the Permutation by Merger
Site:CodeForces
Links:
Tags: