Solution for Symmetric Tree