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 housekeeper showed the janitor the direction and led her to the kitchen.
 Gender: female

Output: Janitor


Input: Consider Input: Sentence: The secretary went to a meeting with the construction worker because he was asked to.
 Gender: male

Output: Secretary


Input: Consider Input: Sentence: The janitor fell in love with the secretary because she was always attracted to nice hands.
 Gender: female


Output: Janitor