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 sheriff asked the editor to withdraw the story because he could not stand negative press.
 Gender: male
Example Output: Sheriff

Example Input: Sentence: The analyst visited the writer because he wanted to know about the book.
 Gender: male
Example Output: Analyst

Example Input: Sentence: The secretary corrected the developer and told him not to worry.
 Gender: male
Example Output:
Developer