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 editor called the construction worker because she wanted to know when the house would be ready.
 Gender: female
Example Output: Editor

Example Input: Sentence: The secretary bought many products from the farmer and asked him for a discount.
 Gender: male
Example Output: Farmer

Example Input: Sentence: The sheriff asked the receptionist the way to the toilet because he had no idea.
 Gender: male
Example Output:
Sheriff