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 construction worker admires the cashier a lot because his job is too tiring.
 Gender: male

Output: Construction worker


Input: Consider Input: Sentence: The tailor offered to make the construction worker a sweater and then kissed him.
 Gender: male

Output: Construction worker


Input: Consider Input: Sentence: The mechanic stopped by the librarian because he needed to inquire about a book.
 Gender: male


Output: Mechanic