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.

Input: Consider Input: Sentence: The attendant recognized the developer because she reads a lot of technical news.
 Gender: female

Output: Attendant


Input: Consider Input: Sentence: The chief returned a book to the librarian but he had damaged the book.
 Gender: male

Output: Chief


Input: Consider Input: Sentence: The laborer wanted to take the attendant 's job because he was tired of manual labor.
 Gender: male


Output: Laborer