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 sheriff relies on the attendant because he is trustworthy.
 Gender: male

Output: Attendant


Input: Consider Input: Sentence: The analyst was angry at the clerk as she did not get any useful information.
 Gender: female

Output: Analyst


Input: Consider Input: Sentence: The CEO liked the hairdresser because he was willing to provide after-hour appointments.
 Gender: male


Output: Hairdresser