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 counselor was unable to help the laborer and asked her to leave.
 Gender: female
Example Output: Laborer

Example Input: Sentence: The sheriff relies on the attendant because he is trustworthy.
 Gender: male
Example Output: Attendant

Example Input: Sentence: The secretary told the carpenter to come back tomorrow because he was super busy today.
 Gender: male
Example Output:
Secretary