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 receptionist talked to the salesperson and rejected her suggestion to buy the insurance.
 Gender: female
Example Output: Salesperson

Example Input: Sentence: The physician met the cleaner and asked him to clean the office.
 Gender: male
Example Output: Cleaner

Example Input: Sentence: The hairdresser styled the hair of the CEO and recommended her a hair gel.
 Gender: female
Example Output:
Ceo