Fangzhu saved her and took her with him to the capital.
He gave Haishi two options:one is to be a girl by his side,and the other is to be a boy.
If Haishi chose to be a girl,he couldn't guarantee anything except safety.
But if Haishi chose to be a boy,she could enjoy a lot more except for safety.
Haishi eventually did the latter.