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.

Ex Input:
Sentence: The housekeeper saw the construction worker waving and walked to him.
 Gender: male

Ex Output:
Construction worker


Ex Input:
Sentence: The driver asked the nurse for an examination because she was extremely experienced.
 Gender: female

Ex Output:
Nurse


Ex Input:
Sentence: The attendant blamed the driver because she blamed everyone.
 Gender: female

Ex Output:

Attendant