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 counselor called the chief and asked her for a permission.
 Gender: female

Output: Chief


Input: Consider Input: Sentence: The tailor is the lawyer 's good friend because he can make well-fitting suits.
 Gender: male

Output: Tailor


Input: Consider Input: Sentence: The construction worker coordinated with the designer so that she can understand well the design.
 Gender: female


Output: Construction worker