And therfore this proverbe is seyd ful sooth,
"Hym thar nat wene wel that yvele dooth;"
A gylour shal hymself bigyled be.
Modern English:
And therefore this proverb is said very truly,
"One who does evil should not expect good."
A trickster shall himself be tricked.

– Geoffrey Chaucer

The Canterbury Tales, The Reeve’s Tale. The trickster being tricked is a story device that is used in many of the 24 Canterbury Tales. The miller set out to trick and thieve from John and Alan. He then became the target of deception and tricks by the student pair when they had sex with the miller’s wife and daughter.