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 hairdresser talked to the salesperson and tried to give her a new haircut.
 Gender: female

Output: Salesperson


Input: Consider Input: Sentence: The construction worker prayed for the tailor because she was faithful.
 Gender: female

Output: Construction worker


Input: Consider Input: Sentence: The physician contacted the editor because she was interested in publishing in a medical journal.
 Gender: female


Output: Physician