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 carpenter called the hairdresser and then asked her for help.
 Gender: female
Example Output: Hairdresser

Example Input: Sentence: The laborer called the accountant because he had questions about his salary.
 Gender: male
Example Output: Laborer

Example Input: Sentence: The carpenter owed the counselor some money and she never asked for any interest.
 Gender: female
Example Output:
Counselor