Three wishes
Three wishes is a literary motif, often encountered in the joke format, in which a character is given three wishes by a supernatural being, and dramatically, horrifically, or comedically fails to make the best use of them. Common scenarios include releasing a genie from a lamp, catching and agreeing to release a mermaid or magical fish, or crossing paths with the devil. In some uses, the first two wishes go as expected, with the third wish being misinterpreted, or granted in an unexpected fashion that doesn't reflect the intent of the wish. In others, the first wish causes things to go awry, and the second wish only makes things worse, with the third wish being used to return things to the way they were before the first two wishes. Alternatively, the wishes are split between three people, with the last person's wish inadvertently or intentionally thwarting or undoing the wishes of the other characters.
The three wishes motif has an Aarne–Thompson–Uther Index tale number of 750A.
The motif has been described as "common in oral tradition for centuries (particularly in Arabian fantasy), with wishes granted by genies freed from a bottle".