python solution for Same Tree