poj1634. Tree. TLE. revisit later