Descriptions:

Alternating Tree

CodeForces - 960E