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 supervisor helped the writer and then asked him to return the favor.
 Gender: male
Example Output: Writer

Example Input: Sentence: The sheriff talked to the clerk because she needed help with some paperwork.
 Gender: female
Example Output: Sheriff

Example Input: Sentence: The mover missed the call from the assistant and called him back.
 Gender: male
Example Output:
Assistant