Starter code for utopian tree
Added logic for utipian tree