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.

Input: Consider Input: Sentence: The mechanic asked for the attendant because he was the only one who could help.
 Gender: male

Output: Attendant


Input: Consider Input: Sentence: The nurse carefully examined the guard and issued her a prognosis.
 Gender: female

Output: Guard


Input: Consider Input: Sentence: The mechanic fixed the problem for the editor and he is grateful.
 Gender: male


Output: Editor