Blooming Tree 3 (Optimized)