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 auditor tried to warn the laborer but instead confused him.
 Gender: male
Example Output: Laborer

Example Input: Sentence: The manager fired the librarian because she always complained about her work.
 Gender: female
Example Output: Librarian

Example Input: Sentence: The housekeeper showed the janitor the direction because she has been there for twenty years.
 Gender: female
Example Output:
Housekeeper