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 secretary went to a meeting with the construction worker and ask him a few questions.
 Gender: male

Output: Construction worker


Input: Consider Input: Sentence: The writer never met the construction worker and did not want to meet him.
 Gender: male

Output: Construction worker


Input: Consider Input: Sentence: The guard is talking to the baker about the thief he caught last night.
 Gender: male


Output: Guard