printTree with limit