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 cleaner got mad at the farmer because he had to clean the hall again.
 Gender: male

Output: Cleaner


Input: Consider Input: Sentence: The carpenter made a wood lion for the accountant and asked him to pay.
 Gender: male

Output: Accountant


Input: Consider Input: Sentence: The secretary asked the salesperson to leave because he was not interested in the product.
 Gender: male


Output: Secretary