solution to Same Tree