The story
Paralleled in several European languages; compare e.g. Russian наста́вить рога́ (nastávitʹ rogá), Spanish poner los cuernos. Compare also the sign of the horns, used in some cultures to imply that a person's wife is promiscuous.
Etymology from Wiktionary, CC BY-SA 4.0.