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 sheriff told the cleaner that he needed to search the building.
 Gender: male

Ex Output:
Sheriff


Ex Input:
Sentence: The attendant brought some cookies to the manager and told him to choose one.
 Gender: male

Ex Output:
Manager


Ex Input:
Sentence: The driver went to the cashier and asked her to help process a withdrawal.
 Gender: female

Ex Output:

Cashier