Quine brain teaser

In computer programming, a quine is a program that outputs its own code.

This brain teaser concerns an extremely basic programming language. The code and output are sequences of just two symbols, ⚫ and πŸ”΄. In the code:

  • ⚫ means "output the next 3 symbols (and jump past them in the code)"
  • πŸ”΄ means "repeat the last 3 symbols of the output." If the output is empty, πŸ”΄ has no effect on the output

For example:

Code⚫ ⚫ ⚫ πŸ”΄ πŸ”΄ πŸ”΄
Output⚫ ⚫ πŸ”΄ ⚫ ⚫ πŸ”΄ ⚫ ⚫ πŸ”΄

This example is interactive. Click the code symbols to toggle between ⚫ and πŸ”΄.


Find a quine, i.e., code that is identical to the output.


This brain teaser was inspired by Russ Cox's fascinating article Zip Files All The Way Down.