Rerooting With a Merge That Has No Inverse

Company: Adobe Hackathon_9aug

Difficulty: hard