problem12 solve