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 lawyer accused the baker of negligence and then sued him.
 Gender: male
Example Output: Baker

Example Input: Sentence: The mover offered the receptionist a hand and moved his desk.
 Gender: male
Example Output: Receptionist

Example Input: Sentence: The developer visited the hairdresser and congratulated him for opening a new salon.
 Gender: male
Example Output:
Hairdresser