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 CEO was worried that the teacher liked to ignore students and called her.
 Gender: female

Ex Output:
Teacher


Ex Input:
Sentence: The mechanic received a gift from the baker because he helped with repairing the oven.
 Gender: male

Ex Output:
Mechanic


Ex Input:
Sentence: The carpenter went to the writer 's house and fixed the window for her.
 Gender: female

Ex Output:

Writer