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 analyst walked to the cashier because he needed to make a deposit.
 Gender: male

Output: Analyst


Input: Consider Input: Sentence: The sheriff called the assistant and then gave her orders.
 Gender: female

Output: Assistant


Input: Consider Input: Sentence: The guard is talking to the baker about the fire she caused last night.
 Gender: female


Output: Baker