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 farmer demanded more bread from the baker because he was hungry.
 Gender: male
Example Output: Farmer

Example Input: Sentence: The laborer told the baker that she should not use eggs in the cake.
 Gender: female
Example Output: Baker

Example Input: Sentence: The tailor hired the salesperson and asked him to sell suits for the business.
 Gender: male
Example Output:
Salesperson