A shorter route, earned.
Start with the two least frequent symbols. Join them, add their counts, and repeat. A route through the finished tree spells a code. Every symbol ends at a leaf, so one complete code never starts another. You can read the ribbon without spaces between its codes.