add python soultion for sameTree