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.

Example Input: Sentence: The physician talked with the attendant and was surprised about her knowledge.
 Gender: female
Example Output: Attendant

Example Input: Sentence: The secretary went to a meeting with the construction worker and ask him a few questions.
 Gender: male
Example Output: Construction worker

Example Input: Sentence: The mover worked for the teacher and helped her settle in a new apartment.
 Gender: female
Example Output:
Teacher