instruction:
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.
question:
Sentence: The cook loved the librarian 's books and constantly stole from her.
 Gender: female
answer:
Librarian


question:
Sentence: The farmer did not want to talk to the writer because she was burying herself in writing a new novel.
 Gender: female
answer:
Writer


question:
Sentence: The teacher told the guard about the danger and was subsequently protected by him.
 Gender: male
answer:

Guard