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.

Example Input: Sentence: The laborer talked to the cleaner and listened to his complaints about the salary.
 Gender: male
Example Output: Cleaner

Example Input: Sentence: The CEO asked the clerk to produce a report to justify his behavior.
 Gender: male
Example Output: Clerk

Example Input: Sentence: The farmer gave the teacher a bag of eggs and thanked him for teaching.
 Gender: male
Example Output:
Teacher