Union on Tree

CodeChef - BTREE