Write a proper quine containing at least one newline/linefeed whose every unfurling is either itself a proper quine or outputs the original quine. Your answer can mix and match outputting itself and outputting the original quine.
Unfurlings consist of:
- Appending spaces to make the input a rectangle.
- Taking all lines above the bottom one and rotating them a quarter-turn clockwise about the lower-right corner so that the right edge is on the same level as the bottom edge.
- Repeat step (2) until the string is a single line to find all unfurlings.
For example, the first unfurling of
GFE HID ABC
HG IF ABCDE
and the rest are
HG IF ABCDE IH ABCDEFG I ABCDEFGH ABCDEFGHI
For example, if you have a program
(no trailing spaces)
then it must be a proper quine and print itself(
\n represents a linefeed/newline).
According to the output of the unfurling program, we see that the next step in unfurling is
(note trailing space)
This must either print itself(
' K\nAB ') or the original program (
The next step in the unfurling is
This must either print itself (
'AB K'), or the original program(
The byte-count of this program is