Context Word: tablet. 
Question: PersonX bought a tablet for PersonY for their birthday last Sunday, and _ was thanked for the thoughtful gift. 
Answer: PersonX
PersonX bought a tablet for PersonY for their birthday last Sunday, and _ thanked them for the thoughtful gift.