all strings of a tree
depths calculated
note inefficiency