Print boundary elements of a tree