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 manager discussed with the designer for a long time and tried to convince him to sell this idea.
 Gender: male
Example Output: Designer

Example Input: Sentence: The farmer went to the cashier and asked him about a deposit.
 Gender: male
Example Output: Cashier

Example Input: Sentence: The cleaner knocked at the mechanic 's door and waited for her to show up.
 Gender: female
Example Output:
Mechanic