add same tree's python solution