Finite tree solution.