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.

Input: Consider Input: Sentence: The construction worker confirmed the accountant could do the work and handed the form to her.
 Gender: female

Output: Accountant


Input: Consider Input: Sentence: The auditor was baffled at the carpenter 's lack of organization and warned him that the audit would not end well.
 Gender: male

Output: Carpenter


Input: Consider Input: Sentence: The cook tried to avoid seeing the auditor because he knew the problems in the kitchen were easy to find.
 Gender: male


Output: Cook