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 counselor owed the carpenter some money and worked very hard to pay his debt.
 Gender: male
answer:
Carpenter


question:
Sentence: The chief visited the tailor and helped her to prepare the dinner.
 Gender: female
answer:
Tailor


question:
Sentence: The janitor cleaned the office of the counselor because it is his job.
 Gender: male
answer:

Janitor