The three wishes joke (or genie joke) is a joke format in which a character is given three wishes by a supernatural being, and 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. 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. 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. An example of the three wishes joke runs as follows:

Variations 
One variation on the theme has the protagonist turning the tables on the genie, who for some contrived reason has placed a condition on the wishes that would result in an opponent of the protagonist also benefiting from the wishes. An example of this joke was used in The Simpsons episode, "Homer Simpson, This Is Your Wife". There, a character tells Marge Simpson a joke in which a genie promises to grant a man whatever he wishes, with the caveat that the man's wife's lover gets double whatever the man gets. After first wishing for a house and a car, the man wishes to be beaten "half to death" — which Marge doesn't understand.

A very early version of the joke is found in an 1875 book of Scottish anecdotes. There, a Scottish highlander is asked what his three wishes would be. He first wishes for a lake full of whisky. His second wish is for a similar quantity of good food. When asked for his third wish, after a moment of indecision, he asks for a second lake full of whisky.

A variation attributed to Denis Norden shows three people being granted three wishes, with two making very good choices, and the other making comically bad choices.

Yet another variation is the one where the first wishes go wrong and through the last one, the protagonist(s) end up exactly the way they were from the beginning. An example of this is the following, taken from Charles Perrault's story The Ridiculous Wishes:

In fiction
The format is not always used for humor. In "The Monkey's Paw", a horror short story by author W. W. Jacobs, the paw of a dead monkey is a talisman that grants its possessor three wishes, but the wishes come with an enormous price. In the story, the recipient of the monkey's paw wishes for £200, only to learn that his son has been killed in a terrible work accident, for which the employer makes a goodwill payment of £200. Later, the mother asks that the dead son be wished back to life. Upon hearing strange sounds and a knock at the door, the father realizes that the thing outside would be a horribly mutilated body, and wishes it away with the paw's final wish.

See also 
 Aladdin
 One Thousand and One Nights

References

Joke cycles