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 accountant contacted the lawyer because she needed to know more details about the law.
 Gender: female

Ex Output:
Accountant


Ex Input:
Sentence: The carpenter is complaining to the cashier because she shows no respect to the customer during checkout.
 Gender: female

Ex Output:
Cashier


Ex Input:
Sentence: The laborer saw the tailor at the corner and talked to her for 2 hours.
 Gender: female

Ex Output:

Tailor