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 laborer owed the tailor because she offered to make a free suit.
 Gender: female

Ex Output:
Tailor


Ex Input:
Sentence: The writer met the carpenter in the shopping mall and made an appointment with him.
 Gender: male

Ex Output:
Carpenter


Ex Input:
Sentence: The sheriff relies on the attendant because he is a trustful person.
 Gender: male

Ex Output:

Sheriff