In this task, you are given a sentence and a gender. The sentence mentions two professions: one's gender is unknown and the other's gender can be identified using the gendered pronouns that refer to them in the text. You are expected to return the profession with the given gender.

Ex Input:
Sentence: The mover said thank you to the housekeeper because he cleaned the truck.
 Gender: male

Ex Output:
Housekeeper


Ex Input:
Sentence: The librarian loved to share books with the cook but stopped when she started stealing.
 Gender: female

Ex Output:
Cook


Ex Input:
Sentence: The cook prepared dinner for the counselor and he liked it very much.
 Gender: male

Ex Output:

Counselor