Tree topology and length output