text:
(The other day) I met a bear

Meta discussion: Is "(The other day) I met a bear" a duplicate?

Your challenge is to output this text:
The other day,
The other day,
I met a bear,
I met a bear,
A great big bear,
A great big bear,
Oh way out there.
Oh way out there.

The other day,
I met a bear,
A great big bear,
Oh way out there.

He looked at me,
He looked at me,
I looked at him,
I looked at him,
He sized up me,
He sized up me,
I sized up him.
I sized up him.

He looked at me,
I looked at him,
He sized up me,
I sized up him.

He said to me,
He said to me,
"Why don't you run?
"Why don't you run?
I see you ain't,
I see you ain't,
Got any gun."
Got any gun."

He said to me,
"Why don't you run?
I see you ain't,
Got any gun."

I says to him,
I says to him,
"That's a good idea."
"That's a good idea."
"Now legs get going,
"Now legs get going,
get me out of here!"
get me out of here!"

I says to him,
"That's a good idea."
"Now legs get going,
get me out of here!"

And so I ran,
And so I ran,
Away from there,
Away from there,
But right behind me,
But right behind me,
Was that bear.
Was that bear.

And so I ran,
Away from there,
But right behind me,
Was that bear.

In front of me,
In front of me,
There was a tree,
There was a tree,
A great big tree,
A great big tree,
Oh glory be!
Oh glory be!

In front of me,
There was a tree,
A great big tree,
Oh glory be!

The lowest branch,
The lowest branch,
Was ten feet up,
Was ten feet up,
So I thought I'd jump,
So I thought I'd jump,
And trust my luck.
And trust my luck.

The lowest branch,
Was ten feet up,
So I thought I'd jump,
And trust my luck.

And so I jumped,
And so I jumped,
Into the air,
Into the air,
But I missed that branch,
But I missed that branch,
A way up there.
A way up there.

And so I jumped,
Into the air,
But I missed that branch,
A way up there.

Now don't you fret,
Now don't you fret,
And don't you frown,
And don't you frown,
I Caught that branch,
I Caught that branch,
On the way back down!
On the way back down!

Now don't you fret,
And don't you frown,
I Caught that branch,
On the way back down!

This is the end,
This is the end,
There aint no more,
There aint no more,
Unless I see,
Unless I see,
That bear once more.
That bear once more.

This is the end,
There aint no more,
Unless I see,
That bear once more.

Pattern:
First, each line is repeated once, linebreak-separated, and then 2 newlines, and then the above stanza is printed without the repetition. Then the next stanza.
Rules

Trailing whitespace is allowed at the end of the output, but the rest must be printed as-is.

Is there any reason you don't think this is a duplicate of the rickroll challenge?

@Riker this challenge has a different repetition pattern and answers should be very diffrent.

@Riker https://codegolf.meta.stackexchange.com/questions/6956/trigger-happy-on-the-duplicate-button-do-we-really-consider-all-song-lyric-ques

@programmer5000 aside from the simple repeat each line twice, then repeat the paragraph, it doesn't really have any other patterns. I think that's a pretty trivial difference, personally.

There is no logical connection between "this challenge has a different repetition pattern" and "answers should be very different". If you take the time to understand the answers to the rickroll challenge you'll discover that they nearly all use an approach which is near-optimal for any repetition pattern more complicated than "no repetition".

Just looking at the pattern here, it's more structured than the rickroll, meaning that you can apply an extra problem-specific level of compression here that you can't there. However, the problem is that that's only a small part of the challenge, and the bulk of the challenge is identical to that of the rickroll. Or in other words, this is a rickroll + 1 extra step. It might have been a better challenge as the extra step on its own. (I don't have much of a strong opinion as to whether this is a dupe.)

May we output ain't in the final two stanzas (it is written correctly earlier in the song)?

@JonathanAllan yes.

Can there be prepending whitespace?

@dzaima yes, there can.

I call dibs on the ~503 byte bubblegum answer once I get the compression to give me the right text.

Personally I believe marking questions like these as duplicates is disappointing. It's very uncommon for someone to find the original challenge asked almost 5 years ago ago post their answer there. A spin off such as this should be perfectly acceptable as it reanimates this type of challenge in new light.

@YamB agreed. And it looks like it is finally open! Thanks if that last vote was yours!

If two different gold code-golf members have dupe closed this don't you think that is a sign?

Just as a note, this question has now been to reopen review three times, and received a total of 7 "leave closed" votes and 3 "reopen" votes. (This is in addition to all the close and reopen votes that have been made on the question directly.) At this point, it may be worth discussing this on Meta rather than trying to use the review system.

JavaScript (ES6), 690 bytes

f=(n=0)=>n<139?[...'DEFJKLMPQRVXYZ~0123456789'].map(c=>s=(e=s.split(c)).join(e.pop()),s=`P2other day9Xme8a 03 09Oh ~F8t6.|H2Yme9XYM9H2VZXV M.|H2said4oZ"Why7run?|Xse2yFEin't9Go8anyDun."|Xsays4o M9"That'sEDood idea."|"Now legsDe8going9ge8m2F8of 6!"1ran9A~Lm469Bu8riKbehindZWasQa80.|In Ln8ofZT6 wasE4Re34Re9OhDlory be!P2lowes5Was4en fee8up9So IQFKI'd jump9J4rus8my luck.1jumped9IntoQ2air9Bu8XmissedQa5A ~up46.|Now7fRt9J7Lwn9XCauKtha5OnQ2~back down!Pis isQ2end9T6Ein8no moR9Unless Xsee9Tha80 onc2moR.9,|8t 7 don'8yF 6heR58branch94 t39ADRa8big2e 1|J so X0bear~way Z me9YlookedE8XI Vsized upRreQ4hP|ThMhimLfroKgh8JAndFouE aD g`)&&s.split`|`[(i=+'11223344012340'[n%14])&&i+(n/14<<2)]+`
`+f(n+1):''

console.log(f())

How?
The 41 unique lyric lines (including the empty one) are stored in a pipe-separated string s.
"|The other day,|I met a bear,|A great big bear,|...|Unless I see,|That bear once more."

This string is compressed by replacing the most frequent sub-strings with characters that are not used anywhere else. The character set is "DEFJKLMPQRVXYZ~0123456789" and the substitutions are processed as follows (note that this is the decompression order):
 1. "D" -> " g"         | 10. "R" -> "re"         | 19. "3" -> "9A grea8big"
 2. "E" -> " a"         | 11. "V" -> "sized up"   | 20. "4" -> " t"
 3. "F" -> "ou"         | 12. "X" -> "I "         | 21. "5" -> "8branch9"
 4. "J" -> "And"        | 13. "Y" -> "looked a8"  | 22. "6" -> "here"
 5. "K" -> "gh8"        | 14. "Z" -> " me9"       | 23. "7" -> " don'8you "
 6. "L" -> "fro"        | 15. "~" -> "way "       | 24. "8" -> "t "
 7. "M" -> "him"        | 16. "0" -> "bear"       | 25. "9" -> ",|"
 8. "P" -> "|Th"        | 17. "1" -> "|And so I " |
 9. "Q" -> "4h"         | 18. "2" -> "e "         |

The compressed format is the one used in several popular JS packers such as RegPack: the substituted string is stored just after a last occurrence of the substitution character. Below is an example for "TwoBearsThreeBearsFourBearsFiveBears!", where "Bears" is packed as "~":

Hence the decompression formula:
c => s = (e = s.split(c)).join(e.pop())

Once s has been decompressed, we rebuild the original verses by applying the pattern:
00 - Line A
01 - Line A
02 - Line B
03 - Line B
04 - Line C
05 - Line C
06 - Line D
07 - Line D
08 - (empty)
09 - Line A
10 - Line B
11 - Line C
12 - Line D
13 - (empty)

I love the compression method!

I have no idea how you come up with this stuff! +1

@Shaggy I should have added some explanation in my initial post, but it was late. This compression method is quite popular in the demo-scene and in middle-size JS golfing competitions such as JS1K. Answer now updated. :-)

@Neil It's pretty cool indeed, but just to clarify: I didn't invent it -- although I did write a few variations along the same lines. (See my edited answer.)

Thanks for the excellent explanation, @Arnauld, definitely quicker than trying to decipher it myself!

05AB1E, 508 491 434 432 443 bytes
“€€€¶‚Ž, I™¬€…Ÿâ, Aƒ‰„¥Ÿâ,Šçƒƒ€Ä€Ç.€½Ÿà€›€á, IŸà€›„š,€½¼¸€¾€á, I¼¸€¾„š.€½‚Þ€„€á, "Why¥Ú't€î‡Ð? I€È€î ain't,†«€Æ©ª." IˆÍ€„„š, "That's€…‚¿Ž©." "Now©Ý€Õ…ì, xget€á€Ä€‚€Î!"€ƒ€Ê I³Þ,‡ë€š€Ç,€³ƒ©•¦€á,€¥€ŠŸâ.€†ˆæ€‚€á,€Ç€¥€…íÍ, Aƒ‰„¥íÍ,Šç»¦€ï!€€™…›ì,€¥—¿î°€¾,€Ê IŠã I'dïÅ,€ƒîç€¯³†.€ƒ€Ê IïÅed,‚í€€…Ö,€³ I°‡€Š›ì, Aƒƒ€¾€Ç.€Ó¥Ú't€î fret,€ƒ¥Ú't€î frown, I Caught€Š›ì,€‰€€ƒƒ‚ƒ„‹!€Œ€ˆ€€„–,€Ç ain't€¸€£,•Õ I€È,€ŠŸâˆ…€£.“#•:}nιÉ.sšžD•4вÌ£4ôvyvyðýª'XK})©€Dõ®õ)˜»,

Try it online!
This was painful.

I've never been so happy to see a challenge already completed in 05AB1E, glad I didn't have to do this one hahaahahahahaa. Amazing that you took the time to +1.

Python, 897 891 875 bytes
6 bytes saved thanks to @Emigna
for x in[['The other day,','I met a bear,','A great big bear,','Oh way out there.'],['He looked at me,','I looked at him,','He sized up me,','I sized up him.'],['He said to me,','"Why don\'t you run?',"I see you ain't,",'Got any gun."'],['I says to him,','"That\'s a good idea."','"Now legs get going,','get me out of here!"'],['And so I ran,','Away from there,','But right behind me,','Was that bear.'],['In front of me,','There was a tree,','A great big tree,','Oh glory be!'],['The lowest branch,','Was ten feet up,',"So I thought I'd jump,",'And trust my luck.'],['And so I jumped,','Into the air,','But I missed that branch,','A way up there.'],["Now don't you fret,","And don't you frown,",'I Caught that branch,','On the way back down!'],['This is the end,','There aint no more,','Unless I see,','That bear once more.']]:print(*(y+'\n'+y for y in x),'',*x,'',sep='\n')

You can save a couple of bytes by looping over the list directly instead of assigning it to m. You should also remove the last newline to both save bytes and match the correct output.

@Emigna thanks! also, trailing whtespace is allowed

Yes, but only at the end of the output. You had an extra newline after each section of text (8+4 rows). Fixed now :)

Which Python version are you using? I'm getting a Syntax Error at the *x (Python 3.4.4)

@alexis this needs 3.5+, see this: https://www.python.org/dev/peps/pep-0448/

Thanks! Yeah it cost me a few bytes without this feature, but I managed pretty well by not using a list, check it out :-)

brainfuck, 23913 bytes
-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.+++++[->+++<]>.+++++.------------.---.+++++++++++++.[-->+++++<]>+++.+[->+++<]>+.---.+[--->+<]>+++.-[-->+++++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.+++++[->+++<]>.+++++.------------.---.+++++++++++++.[-->+++++<]>+++.+[->+++<]>+.---.+[--->+<]>+++.-[-->+++++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.+[----->+<]>.--------.[--->+<]>---.[---->+<]>+++.[->+++<]>+.-[->+++<]>.[->+++<]>++.+++.----.--[--->+<]>---.[++>---<]>+.>++++++++++.++[++++>---<]>.-[->++++<]>.+[----->+<]>.--------.[--->+<]>---.[---->+<]>+++.[->+++<]>+.-[->+++<]>.[->+++<]>++.+++.----.--[--->+<]>---.[++>---<]>+.>++++++++++.+++[->+++++<]>.-[-->+<]>.++[->+++<]>+.+++++++++++.-------------.----.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++++++.--.-[--->+<]>--.[->+++<]>++.+++.----.--[--->+<]>---.[++>---<]>+.>++++++++++.+++[->+++++<]>.-[-->+<]>.++[->+++<]>+.+++++++++++.-------------.----.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++++++.--.-[--->+<]>--.[->+++<]>++.+++.----.--[--->+<]>---.[++>---<]>+.>++++++++++.[->++++++++<]>-.-[--->++++<]>.--[--->+<]>--.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.+++++[->+++<]>.++++++.-.[---->+<]>+++.---[->++++<]>.------------.---.+++++++++++++.-------------.[->+++<]>-.>++++++++++.[->++++++++<]>-.-[--->++++<]>.--[--->+<]>--.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.+++++[->+++<]>.++++++.-.[---->+<]>+++.---[->++++<]>.------------.---.+++++++++++++.-------------.[->+++<]>-.>++++++++++..>-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.+++++[->+++<]>.+++++.------------.---.+++++++++++++.[-->+++++<]>+++.+[->+++<]>+.---.+[--->+<]>+++.-[-->+++++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.+[----->+<]>.--------.[--->+<]>---.[---->+<]>+++.[->+++<]>+.-[->+++<]>.[->+++<]>++.+++.----.--[--->+<]>---.[++>---<]>+.>++++++++++.+++[->+++++<]>.-[-->+<]>.++[->+++<]>+.+++++++++++.-------------.----.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++++++.--.-[--->+<]>--.[->+++<]>++.+++.----.--[--->+<]>---.[++>---<]>+.>++++++++++.[->++++++++<]>-.-[--->++++<]>.--[--->+<]>--.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.+++++[->+++<]>.++++++.-.[---->+<]>+++.---[->++++<]>.------------.---.+++++++++++++.-------------.[->+++<]>-.>++++++++++..++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.++[--->++<]>.+++..----.------.-.-[--->+<]>-.[->+++<]>+.--[--->+<]>-.[---->+<]>+++.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.++[--->++<]>.+++..----.------.-.-[--->+<]>-.[->+++<]>+.--[--->+<]>-.[---->+<]>+++.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.++[--->++<]>.+++..----.------.-.-[--->+<]>-.[->+++<]>+.--[--->+<]>-.[---->+<]>+++.-[--->++<]>--.+.++++.+[----->++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.++[--->++<]>.+++..----.------.-.-[--->+<]>-.[->+++<]>+.--[--->+<]>-.[---->+<]>+++.-[--->++<]>--.+.++++.+[----->++<]>.>++++++++++.++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.---[->++++<]>-.----------.-[--->+<]>++.---[->+++<]>.-.-[--->+<]>-.---[->++++<]>+.-----.[------->++<]>.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.---[->++++<]>-.----------.-[--->+<]>++.---[->+++<]>.-.-[--->+<]>-.---[->++++<]>+.-----.[------->++<]>.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.---[->++++<]>-.----------.-[--->+<]>++.---[->+++<]>.-.-[--->+<]>-.---[->++++<]>+.-----.[------->++<]>.-[--->++<]>--.+.++++.+[----->++<]>++.>++++++++++.++[++++>---<]>.-[->++++<]>.---[->++++<]>-.----------.-[--->+<]>++.---[->+++<]>.-.-[--->+<]>-.---[->++++<]>+.-----.[------->++<]>.-[--->++<]>--.+.++++.+[----->++<]>++.>++++++++++..++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.++[--->++<]>.+++..----.------.-.-[--->+<]>-.[->+++<]>+.--[--->+<]>-.[---->+<]>+++.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.++[--->++<]>.+++..----.------.-.-[--->+<]>-.[->+++<]>+.--[--->+<]>-.[---->+<]>+++.-[--->++<]>--.+.++++.+[----->++<]>.>++++++++++.++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.---[->++++<]>-.----------.-[--->+<]>++.---[->+++<]>.-.-[--->+<]>-.---[->++++<]>+.-----.[------->++<]>.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.---[->++++<]>-.----------.-[--->+<]>++.---[->+++<]>.-.-[--->+<]>-.---[->++++<]>+.-----.[------->++<]>.-[--->++<]>--.+.++++.+[----->++<]>++.>++++++++++..++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.---[->++++<]>-.++[->+++<]>++.++++++++.-----.-[--->+<]>-.---[->++++<]>.-----.[--->+<]>-----.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.---[->++++<]>-.++[->+++<]>++.++++++++.-----.-[--->+<]>-.---[->++++<]>.-----.[--->+<]>-----.+[----->+<]>.--------.-[->+++<]>.>++++++++++.+[->+++<]>+.>+[--->++<]>+.+++[->++++<]>.[--->+<]>+.-[---->+<]>++.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.---[----->++<]>.+++.-------.[------>+<]>++.>++++++++++.+[->+++<]>+.>+[--->++<]>+.+++[->++++<]>.[--->+<]>+.-[---->+<]>++.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.---[----->++<]>.+++.-------.[------>+<]>++.>++++++++++.++[++++>---<]>.-[->++++<]>.---[->++++<]>-.++++[->+++<]>..--[--->+<]>-.--[->++++<]>+.----------.++++++.-[---->+<]>+++.[->+++<]>+.++++++++.+++++.[++>---<]>++.[->+++<]>-.[++>---<]>--.>++++++++++.++[++++>---<]>.-[->++++<]>.---[->++++<]>-.++++[->+++<]>..--[--->+<]>-.--[->++++<]>+.----------.++++++.-[---->+<]>+++.[->+++<]>+.++++++++.+++++.[++>---<]>++.[->+++<]>-.[++>---<]>--.>++++++++++.[->+++++++<]>+.[--->+<]>++.+++++.[---->+<]>+++.[->+++<]>+.+++++++++++++.[--->+<]>-.-[---->+<]>++.++[->+++<]>+.--[--->+<]>--.-------.[----->++<]>++.------------.>++++++++++.[->+++++++<]>+.[--->+<]>++.+++++.[---->+<]>+++.[->+++<]>+.+++++++++++++.[--->+<]>-.-[---->+<]>++.++[->+++<]>+.--[--->+<]>--.-------.[----->++<]>++.------------.>++++++++++..++[->++++++<]>.-[->+++++<]>++.--[--->+<]>-.---[->++++<]>-.++[->+++<]>++.++++++++.-----.-[--->+<]>-.---[->++++<]>.-----.[--->+<]>-----.+[----->+<]>.--------.-[->+++<]>.>++++++++++.+[->+++<]>+.>+[--->++<]>+.+++[->++++<]>.[--->+<]>+.-[---->+<]>++.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.---[----->++<]>.+++.-------.[------>+<]>++.>++++++++++.++[++++>---<]>.-[->++++<]>.---[->++++<]>-.++++[->+++<]>..--[--->+<]>-.--[->++++<]>+.----------.++++++.-[---->+<]>+++.[->+++<]>+.++++++++.+++++.[++>---<]>++.[->+++<]>-.[++>---<]>--.>++++++++++.[->+++++++<]>+.[--->+<]>++.+++++.[---->+<]>+++.[->+++<]>+.+++++++++++++.[--->+<]>-.-[---->+<]>++.++[->+++<]>+.--[--->+<]>--.-------.[----->++<]>++.------------.>++++++++++..++[++++>---<]>.-[->++++<]>.---[->++++<]>-.++[->+++<]>++.+[--->+<]>+++.------.+[---->+<]>+++.---[->++++<]>.-----.[--->+<]>-----.-[--->++<]>--.+.++++.+[----->++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.---[->++++<]>-.++[->+++<]>++.+[--->+<]>+++.------.+[---->+<]>+++.---[->++++<]>.-----.[--->+<]>-----.-[--->++<]>--.+.++++.+[----->++<]>.>++++++++++.+[->+++<]>+.>-[--->+<]>-.[---->+++++<]>-.-------.--[--->+<]>-.+[--->+<]>.-[->+++<]>+.+[---->+<]>+++.[->+++<]>+.-[->+++<]>.++[->+++<]>+.++++++++..-----------.-[--->+<]>-.-[--->++<]>-.-----.+.----.-[-->+<]>--.------------.>++++++++++.+[->+++<]>+.>-[--->+<]>-.[---->+++++<]>-.-------.--[--->+<]>-.+[--->+<]>.-[->+++<]>+.+[---->+<]>+++.[->+++<]>+.-[->+++<]>.++[->+++<]>+.++++++++..-----------.-[--->+<]>-.-[--->++<]>-.-----.+.----.-[-->+<]>--.------------.>++++++++++.+[->+++<]>+.[------->+<]>.-[--->+<]>.++++++++.+[---->+<]>++.++[--->++<]>.-------.++.++++++++++++.+[---->+<]>+++.++[->+++<]>+.--.[--->+<]>---.[---->+<]>+++.++[->+++<]>+.++++++++.------.+++++.-------.---[->+++<]>.>++++++++++.+[->+++<]>+.[------->+<]>.-[--->+<]>.++++++++.+[---->+<]>++.++[--->++<]>.-------.++.++++++++++++.+[---->+<]>+++.++[->+++<]>+.--.[--->+<]>---.[---->+<]>+++.++[->+++<]>+.++++++++.------.+++++.-------.---[->+++<]>.>++++++++++.--[----->+<]>-.--.[--->+<]>---.[---->+<]>+++.+[----->+<]>.--------.--[--->+<]>-.+++++[->+++<]>.++++++.-.[---->+<]>+++.+++++[->+++<]>.---------.[--->+<]>--.-[--->++<]>--.---.+++++++++++++.-------------.--[--->+<]>.+.>++++++++++.--[----->+<]>-.--.[--->+<]>---.[---->+<]>+++.+[----->+<]>.--------.--[--->+<]>-.+++++[->+++<]>.++++++.-.[---->+<]>+++.+++++[->+++<]>.---------.[--->+<]>--.-[--->++<]>--.---.+++++++++++++.-------------.--[--->+<]>.+.>++++++++++..++[++++>---<]>.-[->++++<]>.---[->++++<]>-.++[->+++<]>++.+[--->+<]>+++.------.+[---->+<]>+++.---[->++++<]>.-----.[--->+<]>-----.-[--->++<]>--.+.++++.+[----->++<]>.>++++++++++.+[->+++<]>+.>-[--->+<]>-.[---->+++++<]>-.-------.--[--->+<]>-.+[--->+<]>.-[->+++<]>+.+[---->+<]>+++.[->+++<]>+.-[->+++<]>.++[->+++<]>+.++++++++..-----------.-[--->+<]>-.-[--->++<]>-.-----.+.----.-[-->+<]>--.------------.>++++++++++.+[->+++<]>+.[------->+<]>.-[--->+<]>.++++++++.+[---->+<]>++.++[--->++<]>.-------.++.++++++++++++.+[---->+<]>+++.++[->+++<]>+.--.[--->+<]>---.[---->+<]>+++.++[->+++<]>+.++++++++.------.+++++.-------.---[->+++<]>.>++++++++++.--[----->+<]>-.--.[--->+<]>---.[---->+<]>+++.+[----->+<]>.--------.--[--->+<]>-.+++++[->+++<]>.++++++.-.[---->+<]>+++.+++++[->+++<]>.---------.[--->+<]>--.-[--->++<]>--.---.+++++++++++++.-------------.--[--->+<]>.+.>++++++++++..+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>-.----.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.---[----->++<]>.+++[->+++<]>++.+++++++++++++.[----->++<]>.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>-.----.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.---[----->++<]>.+++[->+++<]>++.+++++++++++++.[----->++<]>.>++++++++++.+++[->+++++<]>.[------->+<]>.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.++[->+++<]>.++++++++++++.---.--.[->+++++<]>-.---[->++++<]>.------------.---.+++++++++++++.-------------.-[->+++<]>.>++++++++++.+++[->+++++<]>.[------->+<]>.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.++[->+++<]>.++++++++++++.---.--.[->+++++<]>-.---[->++++<]>.------------.---.+++++++++++++.-------------.-[->+++<]>.>++++++++++.+[->++++++<]>.++[----->+<]>+.-.[---->+<]>+++.---[----->++<]>.---------.--.+.++++++++++++.[---->+<]>+++.[->+++<]>++.+++.+++.+.+++++.----------.-[--->+<]>-.+[----->+<]>.--------.-[->+++<]>.>++++++++++.+[->++++++<]>.++[----->+<]>+.-.[---->+<]>+++.---[----->++<]>.---------.--.+.++++++++++++.[---->+<]>+++.[->+++<]>++.+++.+++.+.+++++.----------.-[--->+<]>-.+[----->+<]>.--------.-[->+++<]>.>++++++++++.[------>+<]>.++++++++++.--[--->+<]>--.+[---->+<]>+++.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++.----.--[--->+<]>---.++[++>---<]>.>++++++++++.[------>+<]>.++++++++++.--[--->+<]>--.+[---->+<]>+++.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++.----.--[--->+<]>---.++[++>---<]>.>++++++++++..+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>-.----.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.---[----->++<]>.+++[->+++<]>++.+++++++++++++.[----->++<]>.>++++++++++.+++[->+++++<]>.[------->+<]>.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.++[->+++<]>.++++++++++++.---.--.[->+++++<]>-.---[->++++<]>.------------.---.+++++++++++++.-------------.-[->+++<]>.>++++++++++.+[->++++++<]>.++[----->+<]>+.-.[---->+<]>+++.---[----->++<]>.---------.--.+.++++++++++++.[---->+<]>+++.[->+++<]>++.+++.+++.+.+++++.----------.-[--->+<]>-.+[----->+<]>.--------.-[->+++<]>.>++++++++++.[------>+<]>.++++++++++.--[--->+<]>--.+[---->+<]>+++.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++.----.--[--->+<]>---.++[++>---<]>.>++++++++++..++[++++>---<]>.+[--->+<]>.-[->+++++<]>-.++[->+++<]>.++++++++++++.---.-.++++++.[---->+<]>+++.+++++[->+++<]>.---------.[--->+<]>--.+[----->+<]>.--------.-[->+++<]>.>++++++++++.++[++++>---<]>.+[--->+<]>.-[->+++++<]>-.++[->+++<]>.++++++++++++.---.-.++++++.[---->+<]>+++.+++++[->+++<]>.---------.[--->+<]>--.+[----->+<]>.--------.-[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.+++++++++++++.-------------.--[--->+<]>-.--[->++++<]>-.-[->+++<]>-.--[--->+<]>--.+[---->+<]>+++.[->+++<]>+.-[->+++<]>.---[->++++<]>.--.-------------..-[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.+++++++++++++.-------------.--[--->+<]>-.--[->++++<]>-.-[->+++<]>-.--[--->+<]>--.+[---->+<]>+++.[->+++<]>+.-[->+++<]>.---[->++++<]>.--.-------------..-[->+++<]>.>++++++++++.+++[->+++++<]>.-[-->+<]>.++[->+++<]>+.+++++++++++.-------------.----.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++++++.--.-[--->+<]>--.---[->++++<]>.--.-------------..-[->+++<]>.>++++++++++.+++[->+++++<]>.-[-->+<]>.++[->+++<]>+.+++++++++++.-------------.----.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++++++.--.-[--->+<]>--.---[->++++<]>.--.-------------..-[->+++<]>.>++++++++++.[->++++++++<]>-.-[--->++++<]>.--[--->+<]>--.++[->+++<]>+.+++++.+++.+++.+++++++.-[---->+<]>++.[->+++<]>++.+++.--[--->+<]>.[--->+<]>-.[->++++++++<]>-.-[--->++++<]>.--[--->+<]>--.++[->+++<]>+.+++++.+++.+++.+++++++.-[---->+<]>++.[->+++<]>++.+++.--[--->+<]>.[--->+<]>-..++[++++>---<]>.+[--->+<]>.-[->+++++<]>-.++[->+++<]>.++++++++++++.---.-.++++++.[---->+<]>+++.+++++[->+++<]>.---------.[--->+<]>--.+[----->+<]>.--------.-[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.+++++++++++++.-------------.--[--->+<]>-.--[->++++<]>-.-[->+++<]>-.--[--->+<]>--.+[---->+<]>+++.[->+++<]>+.-[->+++<]>.---[->++++<]>.--.-------------..-[->+++<]>.>++++++++++.+++[->+++++<]>.-[-->+<]>.++[->+++<]>+.+++++++++++.-------------.----.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++++++.--.-[--->+<]>--.---[->++++<]>.--.-------------..-[->+++<]>.>++++++++++.[->++++++++<]>-.-[--->++++<]>.--[--->+<]>--.++[->+++<]>+.+++++.+++.+++.+++++++.-[---->+<]>++.[->+++<]>++.+++.--[--->+<]>.[--->+<]>-..>-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.++[--->++<]>.+++.++++++++.[->+++<]>.[--->+<]>----.+.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.++[--->++<]>.+++.++++++++.[->+++<]>.[--->+<]>----.+.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.[------>+<]>.++++++++++.--[--->+<]>--.+[---->+<]>+++.---[->++++<]>.+++[->+++<]>.+++++++++.-[->+++++<]>-.++[->+++<]>.-..[--->+<]>---.[---->+<]>+++.---[->++++<]>+.-----.-[->+++++<]>+.>++++++++++.[------>+<]>.++++++++++.--[--->+<]>--.+[---->+<]>+++.---[->++++<]>.+++[->+++<]>.+++++++++.-[->+++++<]>-.++[->+++<]>.-..[--->+<]>---.[---->+<]>+++.---[->++++<]>+.-----.-[->+++++<]>+.>++++++++++.>-[--->+<]>--.[--->+<]>--.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.---[->++++<]>.------------.+++++++.++++++.++[->+++<]>++.+.++++++++++++.[---->+<]>+++.++++[->++<]>+.+[-->+<]>++.-[--->+<]>++.-[--->+<]>-.-[--->++<]>.+++++++++++.--------.+++.-[->+++++<]>+.>++++++++++.>-[--->+<]>--.[--->+<]>--.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.---[->++++<]>.------------.+++++++.++++++.++[->+++<]>++.+.++++++++++++.[---->+<]>+++.++++[->++<]>+.+[-->+<]>++.-[--->+<]>++.-[--->+<]>-.-[--->++<]>.+++++++++++.--------.+++.-[->+++++<]>+.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>.--.+++.--.+.[---->+<]>+++.+[----->+<]>.--[--->+<]>.-[---->+<]>++.++[--->++<]>.+++++++++.+[->+++<]>+.++++++++.[->++++++++++<]>.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>.--.+++.--.+.[---->+<]>+++.+[----->+<]>.--[--->+<]>.-[---->+<]>++.++[--->++<]>.+++++++++.+[->+++<]>+.++++++++.[->++++++++++<]>.>++++++++++..>-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.++[--->++<]>.+++.++++++++.[->+++<]>.[--->+<]>----.+.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.[------>+<]>.++++++++++.--[--->+<]>--.+[---->+<]>+++.---[->++++<]>.+++[->+++<]>.+++++++++.-[->+++++<]>-.++[->+++<]>.-..[--->+<]>---.[---->+<]>+++.---[->++++<]>+.-----.-[->+++++<]>+.>++++++++++.>-[--->+<]>--.[--->+<]>--.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.---[->++++<]>.------------.+++++++.++++++.++[->+++<]>++.+.++++++++++++.[---->+<]>+++.++++[->++<]>+.+[-->+<]>++.-[--->+<]>++.-[--->+<]>-.-[--->++<]>.+++++++++++.--------.+++.-[->+++++<]>+.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>.--.+++.--.+.[---->+<]>+++.+[----->+<]>.--[--->+<]>.-[---->+<]>++.++[--->++<]>.+++++++++.+[->+++<]>+.++++++++.[->++++++++++<]>.>++++++++++..+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>-.----.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.-[--->++<]>.+++++++++++.--------.+++.-----------.-.[->+++<]>.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>-.----.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.-[--->++<]>.+++++++++++.--------.+++.-----------.-.[->+++<]>.>++++++++++.++[++++>---<]>.+[--->+<]>.++++++.-----.[--->+<]>-----.---[->++++<]>.------------.---.--[--->+<]>-.[->+++<]>+.++++++++.+++++++++.[++>---<]>+.>++++++++++.++[++++>---<]>.+[--->+<]>.++++++.-----.[--->+<]>-----.---[->++++<]>.------------.---.--[--->+<]>-.[->+++<]>+.++++++++.+++++++++.[++>---<]>+.>++++++++++.+[->++++++<]>.++[----->+<]>+.-.[---->+<]>+++.++++[->++<]>+.-[->++++<]>.+[----->+<]>.----.++++++++++..++++[->+++<]>.-.-[--->+<]>-.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.+[->++++++<]>.++[----->+<]>+.-.[---->+<]>+++.++++[->++<]>+.-[->++++<]>.+[----->+<]>.----.++++++++++..++++[->+++<]>.-.-[--->+<]>-.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.+++[->+++++<]>.-[-->+<]>.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.---[->++++<]>+.-----.[------->++<]>.---[->++++<]>.------------.---.+++++++++++++.-------------.[->+++<]>-.>++++++++++.+++[->+++++<]>.-[-->+<]>.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.---[->++++<]>+.-----.[------->++<]>.---[->++++<]>.------------.---.+++++++++++++.-------------.[->+++<]>-.>++++++++++..+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.---[->++++<]>-.----.[--->+<]>-----.++++[->++<]>+.-[->++++<]>.-[--->++<]>.+++++++++++.--------.+++.-----------.-.[->+++<]>.>++++++++++.++[++++>---<]>.+[--->+<]>.++++++.-----.[--->+<]>-----.---[->++++<]>.------------.---.--[--->+<]>-.[->+++<]>+.++++++++.+++++++++.[++>---<]>+.>++++++++++.+[->++++++<]>.++[----->+<]>+.-.[---->+<]>+++.++++[->++<]>+.-[->++++<]>.+[----->+<]>.----.++++++++++..++++[->+++<]>.-.-[--->+<]>-.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.+++[->+++++<]>.-[-->+<]>.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.---[->++++<]>+.-----.[------->++<]>.---[->++++<]>.------------.---.+++++++++++++.-------------.[->+++<]>-.>++++++++++..+++[->++++++<]>.-[--->+<]>.++++++++.+[---->+<]>++.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>.++++++++++++.-------------.[--->+<]>---.[++>---<]>--.>++++++++++.+++[->++++++<]>.-[--->+<]>.++++++++.+[---->+<]>++.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>.++++++++++++.-------------.[--->+<]>---.[++>---<]>--.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>.++++++++++++.---.++++++++.---------.[----->++<]>.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>.++++++++++++.---.++++++++.---------.[----->++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.+[->++<]>+.-[-->+++<]>--.--[--->+<]>.++[->+++<]>++.+.++++++++++++.[---->+<]>+++.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.+[->++<]>+.-[-->+++<]>--.--[--->+<]>.++[->+++<]>++.+.++++++++++++.[---->+<]>+++.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.[->++++++++<]>-.--[--->+<]>-.-[->+++++<]>-.---[->++++<]>.------------.---.--[--->+<]>-.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.[->+++<]>++.-.++.++++++++.-[++>---<]>+.+[->+++<]>+.+++++++++++.++++++++.---------.-[->+++++<]>.[--->+<]>-.[->++++++++<]>-.--[--->+<]>-.-[->+++++<]>-.---[->++++<]>.------------.---.--[--->+<]>-.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.[->+++<]>++.-.++.++++++++.-[++>---<]>+.+[->+++<]>+.+++++++++++.++++++++.---------.-[->+++++<]>.[--->+<]>-..+++[->++++++<]>.-[--->+<]>.++++++++.+[---->+<]>++.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>.++++++++++++.-------------.[--->+<]>---.[++>---<]>--.>++++++++++.+++[->+++++<]>.[--->+<]>+++.----------.-[--->+<]>-.+[->+++<]>+.+++++++++++.-.[++>---<]>++.[->+++<]>-.[---->+<]>+++.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>.++++++++++++.---.++++++++.---------.[----->++<]>.>++++++++++.++[++++>---<]>.-[->++++<]>.+[->++<]>+.-[-->+++<]>--.--[--->+<]>.++[->+++<]>++.+.++++++++++++.[---->+<]>+++.---[->++++<]>.------------.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.[--->+<]>----.+++[->+++<]>++.+++++++++++++.-----------.+++++.----[->+++<]>.>++++++++++.[->++++++++<]>-.--[--->+<]>-.-[->+++++<]>-.---[->++++<]>.------------.---.--[--->+<]>-.--[->++++<]>-.-[->+++<]>-.+[--->+<]>+++.-[---->+<]>++.[->+++<]>++.-.++.++++++++.-[++>---<]>+.+[->+++<]>+.+++++++++++.++++++++.---------.-[->+++++<]>.[--->+<]>-..>-[--->+<]>-.[---->+++++<]>-.+.++++++++++.+[---->+<]>+++.-[--->++<]>-.++++++++++.+[---->+<]>+++.---[->++++<]>.------------.---.--[--->+<]>-.+[->+++<]>++.+++++++++.----------.[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.+.++++++++++.+[---->+<]>+++.-[--->++<]>-.++++++++++.+[---->+<]>+++.---[->++++<]>.------------.---.--[--->+<]>-.+[->+++<]>++.+++++++++.----------.[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.+++++++++++++.-------------.--[--->+<]>-.[->+++<]>+.++++++++.+++++.++++++.[---->+<]>+++.+[----->+<]>+.+.[--->+<]>-----.+[----->+<]>.++.+++.-------------.-[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.+++++++++++++.-------------.--[--->+<]>-.[->+++<]>+.++++++++.+++++.++++++.[---->+<]>+++.+[----->+<]>+.+.[--->+<]>-----.+[----->+<]>.++.+++.-------------.-[->+++<]>.>++++++++++.>-[--->+<]>.--[--->+<]>---.--.-------.[--->+<]>----..+[---->+<]>+++.++++[->++<]>+.-[->++++<]>.---[->++++<]>-.++++[->+++<]>..-[->+++<]>.>++++++++++.>-[--->+<]>.--[--->+<]>---.--.-------.[--->+<]>----..+[---->+<]>+++.++++[->++<]>+.-[->++++<]>.---[->++++<]>-.++++[->+++<]>..-[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++.----.--[--->+<]>---.[-->+++++<]>+++.+++++[->+++<]>.-.-----------.++.--[--->+<]>-.+[----->+<]>.++.+++.-------------.[->+++<]>-.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++.----.--[--->+<]>---.[-->+++++<]>+++.+++++[->+++<]>.-.-----------.++.--[--->+<]>-.+[----->+<]>.++.+++.-------------.[->+++<]>-.>++++++++++..>-[--->+<]>-.[---->+++++<]>-.+.++++++++++.+[---->+<]>+++.-[--->++<]>-.++++++++++.+[---->+<]>+++.---[->++++<]>.------------.---.--[--->+<]>-.+[->+++<]>++.+++++++++.----------.[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.+++++++++++++.-------------.--[--->+<]>-.[->+++<]>+.++++++++.+++++.++++++.[---->+<]>+++.+[----->+<]>+.+.[--->+<]>-----.+[----->+<]>.++.+++.-------------.-[->+++<]>.>++++++++++.>-[--->+<]>.--[--->+<]>---.--.-------.[--->+<]>----..+[---->+<]>+++.++++[->++<]>+.-[->++++<]>.---[->++++<]>-.++++[->+++<]>..-[->+++<]>.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.-------.--[--->+<]>-.[---->+<]>+++.[->+++<]>++.+++.----.--[--->+<]>---.[-->+++++<]>+++.+++++[->+++<]>.-.-----------.++.--[--->+<]>-.+[----->+<]>.++.+++.-------------.[->+++<]>-.

Try it online!
Did I win?

A formatted version of the code would be nice. ;)

Define formatted @raznagul

SOGL, 395 bytes
ev~½ΠΥ≠ļ‚ļ╚■.ō1Τ⁾⁶J1⅓⁶ζ⅝:‚$η╬Μīβ╚ø○θωΔβ}%⁴šσƧxeρ}∙-Pē§′ī□0▼⅞∫╤Κī,└#%℮Δ:╤╝XN3¾3≤Β╚⌡ææ3─λ²‰7y⅜Η⁸‘→≥℮⅓ƨ9$►,cS|kņ═C⁷Ρv ητΕ▓«⁸○!FΩ§@f▒2čļΓμ±'aΖ[A±wdM∙ξ↓I┐η)℮∙↕↑|G-█lz◄xΖp⁴╤§¬╝╔5ξΣ█⅟Q╗Πψū→iT\]ļ⌡Kōnō╗═↓ΝX~⁶←±;ΔÆ▼η╤→=ō>○ξlζ║╥⌠čø▼e≤ā‼1²ζ∑%′`u¤¹ZΕ⅓╚Ƨ╚═′ž⁽μOģΤΒΨs⅜≡8γ¾:╝ss1⅟p?╬¾⌡░WƧΛφ].zΜ╔D/dσ←╝ΣΡ  $β]¤λƨ█‼□nZ⁰⁴ERāv⅔⅔Lv<-ε÷׀@∫νυPθšΦ‚Υ«HΠ¤⅝⅓→∙UWv∞⁵⁾JΕ∙9ø(»≡ΧVδ█∙~³A⁄└υ℮‘+ ¶ΘL{øO4{aIAawa8«-?⁾}≥}≥4{tt≥}≥øO4{O

pastebin of the code because tabs
Explanation:
...‘...‘+                                     push two compressed strings and joins them together (dunno why one doesn't work)
          ¶Θ                                  split on newlines
            L{                                repeat 10 times
              øO                               output a newline
                4{             }               repeat 4 times
                  aIA                           increase variable A, current line of the 40 (default = 0)
                     aw                         get the Ath (1-indexed) item of the lines
                       a8«-                     subtract from A 16
                           ? }                  if [isn't 0]
                            ⁾                    sentence-case it
                              ≥                 put the top item of the stack at the bottom (so ontop would be the line array)
                                ≥              put the top item (line array) of the stack at the bottom, so 1st line is ontop
                                 4{   }        4 times do
                                   tt           output the current line twice
                                     ≥          put the top item (current line) on the bottom (so next line is ontop)
                                       ≥       put the top item (line array) of the stack at the bottom, so 1st line is ontop
                                        øO     output a newline
                                          4{O  4 times output current line

Oh, I'm pretty sure that lowercase g on the 16th unique line is a typo.

@JonathanAllan Well it is lowercase on the top google search result, but I agree that it's weird that it's lowercase.

Looks like the source of the aint vs ain't typo too.

PHP, 636 Bytes
String representation of the 2D array compressed and base64 encoded

foreach(explode(8,gzinflate(base64_decode("VVK7ktswDPwVnBo3GtVWlXFSJG5yRZy5mjZhkrFE3PAxGuXrs6CUONeJwALYhy6eSYrnRNas/XimmQsZurJJ/Xgil9gUuga3V149LWYlqYV0iIfjN6ZJ5MGWAJxZVzzfPsz9CEQOv1Go7zvg3xP9tiGbYKlIa3dvfiUr8VBolUqpxk86wtyeJqDRj18FLONKrsahO6Jt1qwL2sHu4k05ZMhwIpaCZTN0Y/ddFprYZXKQ6CRE14/6OXPTI3dSRS/d8RQtZaEzJRNhggq+J5k3xf34GeAUnIcv7AOwyvrN4L5Xr+DTcDxHHYltq7YvOgrrlFRJzB+93Srw1k2SVqx4OWIAPi6cgQCNm99PMBYzSNf3fvyhHIuXqlzOB0u/6oyy0i+pYnJeaaq3x/BUpAi2yCDCLOiBn2lThORDzohlU7HfPLW4kdSetnr4zOaeuGz3/q/JEjXkL6bx+rDuNbajuvNqbg+MLVG1hkwhtxZH+9ctRF0o4qcQdf1nnDhnan+CInarSeKNG2T4Aw==")))as$z)
echo strtr("0
0
1
1
2
2
3
3

0
1
2
3

",explode(9,$z));

Try it online!
PHP, 651 Bytes
Json encoding of the unique array compressed and base64 encoded

foreach(json_decode(gzinflate(base64_decode("XVK7UgMxDPwVcU2aTH6BCRSQBgpgKBIKJ1ZskzuJ8WNujq9HspMLUHq9knZX2m67V4/A2WMEa6Zlt+w2MGAGA3s0Ud9rcBFNhn1wM/bsYTQTcMmgpbjqPpbb7hGhZz6hBaEP2JpdER8GhYSVwrdA5WsmzYBw5l7JBAuZz6Rd9+4nsEyLDBMXiIVuWy1iBUyQL2U+sMinCVyh1a6r3YRlpqTNziJ24tvkRRKfjtlCsGiUrD9PPEKPLoGTHBwHclqhjwGrZT6Cmr45N1+ThcSwgWioBqbRHCMPLRuF7qQqBuclRfRB+M3TuxFNXrOVXJvvDWkp1SGN9KpNJG7VmiPi/51cMNmJ6zlO0uymttLN9jxiEp5IO/h5JMoQFD/lS6EX1Z49F9W3WVj4LEP9UGM5FqkfJujL4bT661d5aOsGSaIVt7KEePErdxRSkrU2h7OCdT0d2fWvy9HIr6s9RsyX+b9RHqmdy72pWv81fqYqQbvvzeEkpSNdkggJQqrfSPaaqtxMBpIT47anN+oxJahH1Vjn5QDTAStNBH/8AA==")))as$z)
echo strtr("0
0
1
1
2
2
3
3

0
1
2
3

",$z);

Try it online!
PHP, 720 Bytes
Only compressed and base64 encoded

<?=gzinflate(base64_decode("lZTBkpswDIbvPIWSSy4Mr9BJe2i5dA+ls2cnKLYbsHZsMwx9+srebBOIKe4t/2dbvyIkNQqBvEILrZjKopnLGnr0IOCEwi7VEaRF4eGk5Sp5UTCKCWjwEIJilSD/9syJWXxD6Iiu2ALf7LF8BvWDVrpPAH7i9G8Gw9tHiJmu75LvV086w3MrZLwgdAue/qbwIPevaoKWzMHDRAPYwXxKMg6LGKXQfFA+g6/EBTYTyMFU+4XKcd0IGM7F5EKEW61nct8o4Q+OP7EkakG3KPjRCv1OI3QoHUhuCknayDINw88eY1vQBUJj7PZpmJlPtklxNC04ghqsMOVShV69WOrfmzUBPnMwq6XiHkel+XG/Bl8FJ63CMPAgVEu5ZZwTsqhNeGPi34stutBNiMXzF6rlLSbJ48iuER5i2ZGd2Hc3FxmWG+HiQuloRMdXuBZnVaZQ/OvIZsgfdXhLgB+hmF7REIpWH1r4NfTrOJTf24Ed+gm64XytUigrk3yH+0cPV7Atn0FtuNG5B3hW7VKFnuB9q53jNfTeB7ec1k+Ocf3yzrpt36XeyiA/chFG8L56LhZ51aRYcHxkNJoVWMMXEas6M07TFxOTDjmdxPnKwUazW6H5af2PFzeLdqBdPEPTlikQpoPXsAfDC5ssptlP06FzEDf3UjUfCwDInDE+qNIwz387+h8="));

Try it online!
PHP, 870 Bytes
$b="t branch,";$h=here;foreach([["The other day,","I met a bear,","A great big bear,","Oh way out t$h."],["He looked at me,","I looked at him,","He sized up me,","I sized up him."],["He said to me,",'"Why don\'t you run?',"I see you ain't,",'Got any gun."'],["I says to him,",'"That\'s a good idea."','"Now legs get going,','get me out of $h!"'],["And so I ran,","Away from t$h,","But right behind me,","Was that bear."],["In front of me,","There was a tree,","A great big tree,","Oh glory be!"],["The lowes$b","Was ten feet up,","So I thought I'd jump,","And trust my luck."],["And so I jumped,","Into the air,","But I missed tha$b","A way up there."],["Now don't you fret,","And don't you frown,","I Caught tha$b","On the way back down!"],["This is the end,","T$h aint no more,","Unless I see,","That bear once more."]]as$z)echo strtr("0
0
1
1
2
2
3
3

0
1
2
3

",$z);

Try it online!
Expanded

$b="t branch,";$h=here;
foreach([["The other day,","I met a bear,","A great big bear,","Oh way out t$h."]
,["He looked at me,","I looked at him,","He sized up me,","I sized up him."]
,["He said to me,",'"Why don\'t you run?',"I see you ain't,",'Got any gun."']
,["I says to him,",'"That\'s a good idea."','"Now legs get going,','get me out of $h!"']
,["And so I ran,","Away from t$h,","But right behind me,","Was that bear."]
,["In front of me,","There was a tree,","A great big tree,","Oh glory be!"]
,["The lowes$b","Was ten feet up,","So I thought I'd jump,","And trust my luck."]
,["And so I jumped,","Into the air,","But I missed tha$b","A way up there."]
,["Now don't you fret,","And don't you frown,","I Caught tha$b","On the way back down!"]
,["This is the end,","T$h aint no more,","Unless I see,","That bear once more."]]as$z)
echo strtr("0
0
1
1
2
2
3
3

0
1
2
3

",$z);

using of base64 is so clever

JS (ES6), 909 905 bytes
x=>(n=`
`,a=[[`The other day,`,`I met a bear,`,`A great big bear,`,`Oh way out there.`],[`He looked at me,`,`I looked at him,`,`He sized up me,`,`I sized up him.`],[`He said to me,`,`"Why don't you run?`,`I see you ain't,`,`Got any gun."`],[`I says to him,`,`"That's a good idea."`,`"Now legs get going,`,`get me out of here!"`],[`And so I ran,`,`Away from there,`,`But right behind me,`,`Was that bear.`],[`In front of me,`,`There was a tree,`,`A great big tree,`,`Oh glory be!`],[`The lowest branch,`,`Was ten feet up,`,`So I thought I'd jump,`,`And trust my luck.`],[`And so I jumped,`,`Into the air,`,`But I missed that branch,`,`A way up there.`],[`Now don't you fret,`,`And don't you frown,`,`I Caught that branch,`,`On the way back down!`],[`This is the end,`,`There aint no more,`,`Unless I see,`,`That bear once more.`]],s="",a.map(i=>(i.map(z=>s+=(z+n).repeat(2),s+=n,i.map(z=>s+=z+n)),s+=n)),s)

Python3.6, 707 648bytes
First attempt at code-golf, adopting @uriel's answer to include compression of the string
import zlib,base64
n='\n'
for x in zlib.decompress(base64.a85decode("Gaqc3]9:o&%.*X%3&PS1qM!!^OgrLJETV#iKLs/rEPohAPcrDb;W:q/!XiBX3dW2&SeG85%c)sW/nF1_-4Sdn>[gXq'&6f=p%0pg8M-`*4AOe$As#/Z!cVRRnU15<$lom>r'mBomsom`o\\5+:Ju'Znh7rcNXMdK\"<@Xg`5NrGpH^]K)d!ZY5N%;FWa*pA0XB?@HKDjJmEla@$6nAMbB'd//]0'b=QcVOfP7ZQsl0#oXO5*8@^%Bc.>09/Z8g_CX'mrZ[Cl4#91VbG!%q!ro@$UDS_0rLn_5D9673.5%X1$>8$L<pU8^&9ih(%pFc&u,/GaU5c+!7#(!0+&::G<P?8D!U0qk5!fQ`=:c#>;hsK!NfXWFBmNBs-(bpf+$p[`BT./EhYWBiB]G6dCL!;mG4B[^_ILT!it?biY5$D\"mq4aWkQA?VKMQ@GP^87s4\"6>jiMV7+E22L\"oiOm9d=6FeOV`6Ib\#ETWdjr<\A6XX8m+DNOB!%e&\J)")).decode().split('@'):print(*(y+n+y for y in x.split(n)),'',x,'',sep=n)

edit

Changed from base64 to base85
removed some unnecessary escapes in the compressed string
removed the ansi argument from the decode()
changed from $ between verses to \n (from @alexis' answer)

So this has become a hybrid of my orignal submission, @uriel's and @alexis's
Compression
make one big bytes, seperating lines in a verse by $ and verses by @
begin_s = """The other day,','I met a bear,','A great big bear,','Oh way out there.'],['He looked at me,','I looked at him,','He sized up me,','I sized up him.'],['He said to me,','"Why don\'t you run?',"I see you ain't,",'Got any gun."'],['I says to him,','"That\'s a good idea."','"Now legs get going,','get me out of here!"'],['And so I ran,','Away from there,','But right behind me,','Was that bear.'],['In front of me,','There was a tree,','A great big tree,','Oh glory be!'],['The lowest branch,','Was ten feet up,',"So I thought I'd jump,",'And trust my luck.'],['And so I jumped,','Into the air,','But I missed that branch,','A way up there.'],["Now don't you fret,","And don't you frown,",'I Caught that branch,','On the way back down!'],['This is the end,','There aint no more,','Unless I see,','That bear once more."""
new_line = '\n'
new_s = begin_s.replace("','",new_line).replace('","',new_line).replace("',\"",new_line).replace("\",'",new_line).replace("'],['",'@').replace("\"],['",'@').replace("'],[\"",'@')

then compress this with zlib
comp_s = base64.a85encode(zlib.compress(new_s.encode())).decode()

I tried other algorithms, but this seemed smallest
Afterwards checked which characters needed escaping. There were 4" and 6 ' in the string so I used a "string.
base64 vs base85
Base64 gives these lengths
original 715
lzma     500 677
zlib     400 544
bz2      436 592

Base85
original 715
lzma     500 625
zlib     400 500
bz2      436 545

lists the len of the resulting bytes after compression and then after conversion to base64

The len is probably finding things like \n in the string and counting only one byte where there are two. Notepad++ will count an extra \r by default I believe. The actual count is 707 (here is a UTF-8 byte counter).

Hello, and welcome! Great first post!

Take a look at my answer; it's much shorter than Uriel's because it starts with a single string, not a list. If you apply compression to that, you should be able to do even better.

This is a string. The part about compression etc is to show how I arrived at the compressed string and the choice of algorithm

C, 961 952 bytes
#define P(s)puts(s)+
char*s="The other day,I met a bear,A great big bear,Oh way out there.He looked at me,I looked at him,He sized up me,I sized up him.He said to me,_Why don't you run?I see you ain't,Got any gun._I says to him,_That's a good idea.__Now legs get going,get me out of here!_And so I ran,Away from there,But right behind me,Was that bear.In front of me,There was a tree,A great big tree,Oh glory be!The lowest branch,Was ten feet up,So I thought I'd jump,And trust my luck.And so I jumped,Into the air,But I missed that branch,A way up there.Now don't you fret,And don't you frown,I Caught that branch,On the way back down!This is the end,There aint no more,Unless I see,That bear once more.";char a[99],b[99],c[99],d[99];i,j,k,l;f(){char*t[4]={a,b,c,d};for(i=j=k=0;l=s[i++];){t[j][k++]=l-95?l:34;if(l<65&&l-32&&l-39){if(s[i]==95&&l-44)t[j][k++]=34,++i;k=t[j++][k]=0;(j%=4)||P(a)P(a)P(b)P(b)P(c)P(c)P(d)P(d)P("")P(a)P(b)P(c)P(d)P("")0;}}}

Try it online!
#define P(s)puts(s)+
char*s="The other day,I met a bear,A great big bear,Oh way out there.He looked at me,I looked at him,He sized up me,I sized up him.He said to me,_Why don't you run?I see you ain't,Got any gun._I says to him,_That's a good idea.__Now legs get going,get me out of here!_And so I ran,Away from there,But right behind me,Was that bear.In front of me,There was a tree,A great big tree,Oh glory be!The lowest branch,Was ten feet up,So I thought I'd jump,And trust my luck.And so I jumped,Into the air,But I missed that branch,A way up there.Now don't you fret,And don't you frown,I Caught that branch,On the way back down!This is the end,There aint no more,Unless I see,That bear once more.";
char a[99],b[99],c[99],d[99];
i,j,k,l;f()
{
    char*t[4]={a,b,c,d};
    for(i=j=k=0;l=s[i++];)
    {
        t[j][k++]=l-95?l:34;
        if(l<65&&l-32&&l-39)
        {
            if(s[i]==95&&l-44)t[j][k++]=34,++i;
            k=t[j++][k]=0;
            (j%=4)||P(a)P(a)P(b)P(b)P(c)P(c)P(d)P(d)P("")P(a)P(b)P(c)P(d)P("")0;
        }
    }
}

Suggest #define P(s)+puts(s) instead of #define P(s)puts(s)+ and ,a[99],b[99],c[99],d[99],*t[]={a,b,c,d};i,j,k;f(l){for(i=j=k=0;l=s[i++];l<65&&l-32&&l-39?s[i]==95&&l-44?t[j][k++]=34,++i:0,k=t[j++][k]=0,(j%=4)||P(a)P(a)P(b)P(b)P(c)P(c)P(d)P(d)P("")P(a)P(b)P(c)P(d)P(""):0)t[j][k++]=l-95?l:34;} instead of ;char a[99],b[99],c[99],d[99];i,j,k,l;f(){char*t[4]={a,b,c,d};for(i=j=k=0;l=s[i++];){t[j][k++]=l-95?l:34;if(l<65&&l-32&&l-39){if(s[i]==95&&l-44)t[j][k++]=34,++i;k=t[j++][k]=0;(j%=4)||P(a)P(a)P(b)P(b)P(c)P(c)P(d)P(d)P("")P(a)P(b)P(c)P(d)P("")0;}}}

Batch, 984 923 bytes
@echo off
set s="The other day,_I met a bear,_A great big bear,_Oh way out there._He looked at me,_I looked at him,_He sized up me,_I sized up him._He said to me,_""Why don't you run?_I see you ain't,_Got any gun.""_I says to him,_""That's a good idea.""_""Now legs get going,_get me out of here!""_And so I ran,_Away from there,_But right behind me,_Was that bear._In front of me,_There was a tree,_A great big tree,_Oh glory be!_The lowest branch_Was ten feet up,_So I thought I'd jump,_And trust my luck._And so I jumped,_Into the air,_But I missed that branch_A way up there._Now don't you fret,_And don't you frown,_I Caught that branch_On the way back down!_This is the end,_There aint no more,_Unless I see,_That bear once more."
call:c %s:_=" "%
exit/b
:c
for %%l in (%1 %1 %2 %2 %3 %3 %4 %4 "" %1 %2 %3 %4 "")do call:l %%l
shift
shift
shift
shift
if "%~1"=="" exit/b
goto c
:l
set s=(%~1
echo%s:""="%

The quotes really messed me up, but that gave me an idea that saved 61 bytes.

C#, 560 532 bytes
using System;using B=System.IO.MemoryStream;using System.IO.Compression;using System.Text;class p{static void Main(){B i=new B(Convert.FromBase64String("lZXBktowDIbvzPAOgguXTF6hs+2hzaV7aDp7NkTELom9YzuTSZ++khlKIDaYG/pi6xfKL6WWCMZLtNCIqViv6ru4gh49CNijsMvwDVqLwsNetQ/Qu4RRTGAGD5wZyyh6qp2Xeb36gdAZc8IG6HCPRYxUMyBVHyV0y6m/RIbP/2luQXWN6UoZAXnazxOfzwjVgDfXYubx9kNO0Bi98zCZAeygvyQgJUcMsVD0pIiR74YarydoB11uF2Gm+tO04YiYHKe5vIXbeFtL4XeOTNAa04BqUPDFFP5pRuiwddCScVqjdFukKP/uMVjHHIHNs9mmaH5dL0iRoXUDzkAFVuhiGbKzj9b0Z2tHyVdKaVUraShQKrrfp+mHoPolzw/NTrmMMwrIS0zd0nxPh7979vM9qDkjzS530FtMoPnEpxEtgbYzdiL9zX2UJ/006Xk3dWZER6eoPQdZxFloBpIm0ksfPqPkF/fYSzNwJ6tdA3+G/hHn9+LtQDL9BN1wOJVxllvRKzozV/ApbIoYqTRNBrmEBt0uQ7YN7XLlHK20s1MuxT149BZWO23Ay2ZfgIxKXsm/XvH0XpfY0SLvrChk4Tk0o07SCr6J0Opb/QR+16F8rm0vDifKN+pNEr9U3muK7CblQLnwFHVTxAlPE+13D5q+BcZiCv7WHToH4aOwDOvLAgGjDxjulCmaXUeGxj8="));B o=new B();DeflateStream d=new DeflateStream(i,CompressionMode.Decompress);d.CopyTo(o);Console.WriteLine(Encoding.ASCII.GetString(o.ToArray()));}}

My second time code golfing! The code converts base64 to byte array then decompress the result in binary. The code of the compression is not displayed. This could be golfed more though! Feel free to suggest.

In my meaning it is not the whole Output

@JörgHülsermann What's not the whole output?

You have only copy the visible text in the task window. If you scroll it you will see the rest.

@JörgHülsermann Ohh, let me fix it! Thanks for reminding

Python 3.4, 779 651 649 bytes
import zlib,base64
n='\n'
for x in zlib.decompress(base64.a85decode("Gaqc3]9:o&%.*X%3&PS1qM!!^OgrLJETV#iKLs/rEPohAPcrDb;W:q/!XiBX3dW2&SeG85%c)sW/nF1_-4Sdn>[gXq'&6f=p%0pg8M-`*4AOe$As#/Z!cVRRnU15<$lom>r'mBomsom`o\\5+:Ju'Znh7rcNXMdK\"<@Xg`5NrGpH^]K)d!ZY5N%;FWa*pA0XB?@HKDjJmEla@$6nAMbB'd//]0'b=QcVOfP7ZQsl0#oXO5*8@^%Bc.>09/Z8g_CX'mrZ[Cl4#91VbG!%q!ro@$UDS_0rLn_5D9673.5%X1$>8$L<pU8^&9ih(%pFc&u,/GaU5c+!7#(!0+&::G<P?8D!U0qk5!fQ`=:c#>;hsK!NfXWFBmNBs-(bpf+$p[`BT./EhYWBiB]G6dCL!;mG4B[^_ILT!it?biY5$D\"mq4aWkQA?VKMQ@GP^87s4\"6>jiMV7+E22L\"oiOm9d=6FeOV`6Ib\\#ETWdjr<\\A6XX8m+DNOB!%e&\\J")).decode().split("@"):print(n.join(y+n+y for y in x.split(n))+n+n+x+n)

Try it online
Approach
Here's the version without compression: 796 bytes, already a lot shorter than the original Python answer, by @Uriel. That's mainly due to using a single string for the song: An extra split() is much more economical than all the brackets of a long list. As a bonus, the non-repeating stanzas are ready to print without reassembly: just print x.
n='\n'
for x in'''The other day,
I met a bear,
A great big bear,
Oh way out there.@He looked at me,
I looked at him,
He sized up me,
I sized up him.@He said to me,
"Why don't you run?
I see you ain't,
Got any gun."@I says to him,
"That's a good idea."
"Now legs get going,
get me out of here!"@And so I ran,
Away from there,
But right behind me,
Was that bear.@In front of me,
There was a tree,
A great big tree,
Oh glory be!@The lowest branch,
Was ten feet up,
So I thought I'd jump,
And trust my luck.@And so I jumped,
Into the air,
But I missed that branch,
A way up there.@Now don't you fret,
And don't you frown,
I Caught that branch,
On the way back down!@This is the end,
There aint no more,
Unless I see,
That bear once more.'''.split("@"):print(n.join(y+n+y for y in x.split(n))+n+n+x+n)

I ran the above string literal through base64.a85encode(zlib.compress(...)) to get the encoded string of the final solution.
Previous version
This version cut the size down to 779 bytes by abbreviating some letter sequences common enough to make up for a huge replace(...) to unabbreviate them. No more-- that's what compression software is for.
n='\n'
for x in'''The other day,I me~a bear,A grea~big bear,Oh way out%ere.@He looked a~me,I looked a~him,He sized up me,I sized up him.@He said to me,"Why don'~you run?
I see you ain't,Go~any gun."@I says to him,"That's a good idea."
"Now legs ge~going,ge~me ou~of here!"@And so I ran,Away from%ere,Bu~righ~behind me,Was%a~bear.@In fron~of me,There was a tree,A grea~big tree,Oh glory be!@The lowes~branch,Was ten fee~up,So I%ough~I'd jump,And trus~my luck.@And so I jumped,Into%e air,Bu~I missed%a~branch,A way up%ere.@Now don'~you fret,And don'~you frown,I Caught%a~branch,On%e way back down!@This is%e end,There ain~no more,Unless I see,Tha~bear once more.'''.replace("~","t ").replace("%"," th").replace(",",",\n").split("@"):print(n.join(y+n+y for y in x.split(n))+n+n+x+n)

you could shave some off with import base64 as b

I'd already tried that! :-) It shaves off exactly as many characters as it costs. Same for from base64 import a85decompress as a, etc.

I could shave off one character by using @Uriel's * approach, which requires Python 3.5.5. I decided to stick with Python 3.4.

C, 889 874 bytes
char*s="The other day,\0I met a bear,\0A great big bear,\0Oh way out there.\0He looked at me,\0I looked at him,\0He sized up me,\0I sized up him.\0He said to me,\0\"Why don't you run?\0I see you ain't,\0Got any gun.\"\0I says to him,\0\"That's a good idea.\"\0\"Now legs get going,\0get me out of here!\"\0And so I ran,\0Away from there,\0But right behind me,\0Was that bear.\0In front of me,\0There was a tree,\0A great big tree,\0Oh glory be!\0The lowest branch,\0Was ten feet up,\0So I thought I'd jump,\0And trust my luck.\0And so I jumped,\0Into the air,\0But I missed that branch,\0A way up there.\0Now don't you fret,\0And don't you frown,\0I Caught that branch,\0On the way back down!\0This is the end,\0There aint no more,\0Unless I see,\0That bear once more.\0",*p,*w;i;f(){for(w=p=s;*p;++i%4||puts(""),p=(i+4)%8?p+=strlen(p)+1:w,w=i%8?w:p)i%8>3||puts(p),puts(p);}

Compile with enabled signed integers wrap-around(-fwrapv).
This is needed because function answers must produce repeated output on subsequent calls, and the function could conceivably be called repeatedly until global variable i overflows. Since the code only cares about the whether the remainder of division i by 4 and 8 is 0, it doesn't matter what the actual value of i is as long as it is left divisible by 8 after the function returns (and of course it is left divisible by 8).
See it work here.

Suggest omitting the final \0 in the string.

Groovy, 769 745 bytes
a="The other day,xI met a bear,xA great big bear,xOh way out there.xHe looked at me,xI looked at him,xHe sized up me,xI sized up him.xHe said to me,x\"Why don't you run?xI see you ain't,xGot any gun.\"xI says to him,x\"That's a good idea.\"x\"Now legs get going,xget me out of here!\"xAnd so I ran,xAway from there,xBut right behind me,xWas that bear.xIn front of me,xThere was a tree,xA great big tree,xOh glory be!xThe lowest branch,xWas ten feet up,xSo I thought I'd jump,xAnd trust my luck.xNow don't you fret,xAnd don't you frown,xI Caught that branch,xOn the way back down!xThis is the end,xThere aint no more,xUnless I see,xThat bear once more.".split("x")
x=0
f={g->x.upto(x+3){print((a[it]+"\n")*g)};println""}
1.upto(9){f(2);f(1);x+=4}

Doesn't use any compression. Still working hard on this.
Explaination
a="super long string...".split("x") //a string containing all different verses that gets splitted at each character "x", creating an array with one verse at each position
x=0 //used to index the verse array. Starts at 0
f={g->x.upto(x+3){print((a[it]+"\n")*g)};println""} //a shortcut function that prints four consecutives verses starting from verse at position x in the array.  The argument g says how many times each verse will be printed. Then adds a new line (stanza finished)
1.upto(9){ //a loop that repeats 8 times
f(2) //print a group of four verses two times each one
f(1) //print a group of four verses one time each one
x+=4 //go to the next group of four
}

Bash, 863 Bytes
echo "/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4Ah2AjFdACoaCKIDFOe+dP7cKbcEyTzAAg/QvMEQtP11rhlXqhWE7NPlaNhmeElNuKpOqq6JMNkqj/pQaRrgjApagvENO+FmVZT3Wj6eCMH0j29MwN052EeRFsBXigZDjw7DuGAAef52a68lQCl1tH9dnkYyu8k93NXn5exbhDpGUPbcH4kY5+aVF/SCLBHspumKrlX/uqfuYLKPPX+YE7UTFSJ9zPi4Vd2qjgQAbBIIPLx+m2f6ubLOMyS+Bx8OskndeGJ+NL5Hs7/ZK+5yQY9xYTFDPVtEosrkl6WmXgE+UYWkggu+hDaYM+4ci8czabYN5t8lGZVasz1iH4lBS4OzKzj0k/bspdOUXCgDdjBQzazQ82H4fSOX43X6Lp4KnpMV2NoSs334m0s/tuHadQtfRtrHhbjWT2+VPptrA3VMfnBhOYVe6PSmQOhr7s8Oaogin9CtoQmCnmqfhC0Ee8Wn8wnKqy53Vm5vXnl2nkdlciwS+6doHAJAxFWDIo9n+4CxwR6zEd3hy1fdjii5htgnIE4UTCTzBsu/29ftkam+/LBQgL5/VMD/l7rveujYLqwkJEb/OBkd02+Bh7jDA+9DSNEBzCFDTswMAjPb/E18Y8+YhkgWTV953E3n6AgygJhf73EQOJLq8fIjC3Ugn686kpPX2mUlAMVjqOIwlDV7vxXGKCveA2vUXn4t7FGIN/JGYQXKkQgeLnKsi7A9wX+wqMWVmVil61Y0iG717WRjApb+0MtpBgAAAABf85wHBdXu8QABzQT3EAAAGfI0nLHEZ/sCAAAAAARZWg=="|base64 -d|xz -d


text:
Zooming in on a map
Your task is to, given a map as input, zoom it out or in, depending on the scale. Note that the scale given is the scale by which to zoom out, so a scale between 0 and 1 will actually zoom in.
For example, given the following (badly made) map:
..____....
../OOO\...
..\OO/\...
..........

And a scale factor of 2, you should first separate it into 2x2 sections:
.. | __ | __ | .. | ..
.. | /O | OO | \. | ..
----------------------
.. | \O | O/ | \. | ..
.. | .. | .. | .. | ..

And in each section find the most common character:
.__..
.....

Note that there was an ambiguous section:
__
OO

I chose to use _ for this section, but using O would have been perfectly acceptable too.
If, for example, you were given the scale factor of 4, you would split it into 4x4 sections, like so:
..__ | __.. | ..
../O | OO\. | ..
..\O | O/\. | ..
.... | .... | ..

As you can tell, the map doesn't perfectly fit into 4x4 sections, but that's fine, as we can just lower the size of the section at the side.
Also, whenever we need to cut off our maps, we cut off at the bottom or on the right side.
The resulting map would look like so:
...

What an interesting map!
For scale factors below 1, such as 0.5, the process is simpler as we zoom in instead. Take this map:
./O\.
.\O/.

Zooming with a scale of 0.5:
..//OO\\..
..//OO\\..
..\\OO//..
..\\OO//..

Note that whenever your zoom factor is less than 1, the following will always be true: 1/(zoom factor) % 2 == 0. When it is above 1, the only guarantee you have is that it will be a whole number. When it is 1, the map should stay the same.
Examples:
4
/OO\
|OO|
|OO|
\OO/

O

0.25
ABCD

AAAABBBBCCCCDDDD
AAAABBBBCCCCDDDD
AAAABBBBCCCCDDDD
AAAABBBBCCCCDDDD

1
My zoom
should
not change

My zoom
should
not change

You may also take the map as a newline-separated array.

I think you should've waited some more in the Sandbox.

@JonathonAllan No it wouldn't, on that section there are more . than O. We cut off on the right and bottom side.

Ah, by "we cut off at the bottom or on the right side" you mean that the top-left of the map is always the top-left of a section?

@JonathanAllan Yes.

OK, the word "or" is misleading :)

Is it okay to take exact fractions instead of floating point decimal as scale?

@JungHwanMin You can take 1/2 instead of 0.5.

Related.  I don't think this is a dup because this zooms in as well as out.

Reminds me of some sprite work I did on some proc-gen spaceships. Because I knew where the "lines" were (vs. the inside vs. the outside of the ship) I was able to preserve detail when zooming in (i.e not get blocky and pixelated). Because of the rule interactions it meant that certain arrangements (namely a 2x2 square of line pixels) would seemingly create detail when zooming in. I'll see if I can dig up some screenshots.

This was very confusing to read because of the terminology. I believe you have swapped the usages of "zoom in" and "zoom out". Making the map bigger should be zooming in.

@Christian Please try and edit it to make it more clear.

Mathematica, 105 bytes
If[#<1,ArrayFlatten[#2/.n_String:>Table[n,1/#,1/#]],Map[First@*Commonest,#2~Partition~UpTo@{#,#},{2,3}]]&

The input is (scale, array of characters). The scale must be an integer or an exact fraction.
Explanation
If[#<1, ..., ... ]

If the first input is less than 1...
#2/.n_String:>Table[n,1/#,1/#]

Replace all Strings in the second input into a square array, with length 1/(first input)
ArrayFlatten[ ... ]

Flatten the result into a 2D array.
If[#<1, ..., ... ]

If the first input is not less than 1...
#2~Partition~UpTo@{#,#}

Partition the (second input) into partitions whose width/length are at most (first input).
Map[ ..., ... ,{2,3}]

Map onto level 2 and level 3...
First@*Commonest

The composition of the Commonest function (finds the commonest element in a list) and First (take the first element; in case there are multiple commonest elements).

Python, 191 182 180 bytes
lambda m,s,j=''.join,i=int:[j((lambda p:max(p,key=p.count))(j(g[i(x*s):-i(~x*s//1)]for g in m[i(y*s):-i(~y*s//1)]))for x in range(-i(-len(m[0])//s)))for y in range(-i(-len(m)//s))]

Call _(map, scale_factor), where map is an array of lines, and it returns an array of lines.
Though this answer has already been beaten, I want to explain it, as it doesn't special case where the scale factor is less than one.
It makes a h by w matrix, where h = ceiling(map height / scale factor), and w = ceiling(map width / scale factor).
For every index (x, y) in the matrix, do:

Take a submatrix from the coordinates int(x * scale factor), int(y * scale factor) to ceil((x + 1) * scale factor), ceil((y + 1) * scale factor).
Put the most common character in that submatrix at (x, y).

Try it online!
Try test cases

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Happy birthday, Raffaele Cecco!
Raffaele Cecco is a programmer who produced some of the best video games for the ZX Spectrum computer  in the late eighties. Among others, he developed the highly acclaimed Cybernoid and Exolon.
Raffaele is turning 50 on May 10, 2017. This challenge is a small tribute to him, for the happy hours that many of us spent playing those terrific games, and for the motivation they brought.
The challenge
The purpose is to produce a rectangular marquee inspired by that seen in Cybernoid's main menu screen, but in ASCII art.
Specifically, the string "Happy birthday Raffaele Cecco " (note the final space) will be shown rotating along the edges of an 12×5 rectangle, with a constant pause time between snapshots.
For example, assuming the text is displayed clockwise and rotated counter-clockwise (see options below), here are three consecutive snapshots of the rectangular marquee:
Happy birthd
           a
o          y
c
ceC eleaffaR

then
appy birthda
H          y

o          R
cceC eleaffa

then
ppy birthday
a
H          R
           a
occeC eleaff

and so on.
Rules
No input will be taken. Output will be through STDOUT or equivalent, or in a graphical window.
The output should actually depict the text rotating; that is, each new snapshot should overwrite the previous one to give the impression of movement. This can be done by any means, for example, by writing the appropriate number of newlines to effectively clear the screen. It's acceptable if this is valid only for a given screen size; just specify it in the answer.
The following options are accepted:

Text can be displayed clockwise or counter-clockwise, and can be rotated clockwise or counter-clockwise (the example snapshots above assume clockwise displaying and counter-clockwise rotating).
Rotation should go on cyclically in an infinite loop (until the program is stopped), and can start at any phase.
Pause time between snapshots should be approximately constant, but can be freely chosen between 0.1 and 1 s. An initial pause before displaying the first snapshot is acceptable.
Letters can be upper-case, lower-case or mixed case (as in the example above).
Leading or trailing blank space is allowed.

Programs or functions are allowed, in any programming language. Standard loopholes are forbidden.
If possible, please provide a gif file showing the output, or a link to test the program.
Shortest code in bytes wins.

What if it´s impossible to overwrite? Can we use 99 red balloons er ... newlines?

@Titus Only if that effectively clears the screen and gives the impression of moving text (gif please!)

"This can be done by any means, for example, by writing the appropriate number of newlines to effectively clear the screen." - isn't this dependant on the console size? Is it acceptable to print one newline if it (along with the next rectangle) means the next iteration replaces the previous one (in my small console)?

@Jonathan Ok, just provide a gif with that console to see the effect

Jelly, 74  65 bytes
“ÆÇÐÑ÷øœ‘Ṭœṗ⁸ṙ©-¤4421œ?U0¦;"⁷,⁶ẋ⁵¤¤ṁ9¤ȮœS.®ß
“9ɲcḟ#%⁴1t(ŀȷUCOw⁾»Ç

Windows version running in a 6 line high cp-65001 console.
There is a half a second (plus evaluation) pause between iterations:

How?
“9ɲcḟ#%⁴1t(ŀȷUCOw⁾»Ç - Main link: no arguments
“9ɲcḟ#%⁴1t(ŀȷUCOw⁾»  - compression of [d( Happy)+d( birthday)+d( Raff)+s(aele)+d( Ce)+d(cc)+s(o)] - d=dictionaryLookup, s=stringEncode.
                     -              = " Happy birthday Raffaele Cecco"
                   Ç - call last link (1) as a monad

“ÆÇÐÑ÷øœ‘Ṭœṗ⁸ṙ©-¤4421œ?U0¦;"⁷,⁶ẋ⁵¤¤ṁ9¤ȮœS.®ß - Link 1, rotate, print, recurse: string s
                ¤                            - nilad followed by link(s) as a nilad:
            ⁸                                -   link's left argument (initially s)
               -                             -   literal -1
             ṙ                               -   rotate left -1 (e.g. "blah" -> "hbla")
              ©                              -   copy to register and yield
“ÆÇÐÑ÷øœ‘                                    - literal: [13,14,15,16,28,29,30]
         Ṭ                                   - untruth: [0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1]
          œṗ                                 - partition right at truthy indexes of left
                                             -   chops up the rotated string into 8
                                             -   e.g. [" Happy birth",'d','a','y'," Raffaele Ce",'c','c','o'])
             4421œ?                          - get the 4421st permutation of those items
                                             -   e.g. [" Happy birth",'o','d','c','a','c','y'," Raffaele Ce"]
                         ¦                   - apply to indexes:
                        0                    -   0 (right most)
                       U                     -   upend  (e.g. " Raffaele Ce" -> "eC eleaffaR ")
                                     ¤       - nilad followed by link(s) as a nilad:
                                  ¤          -   nilad followed by link(s) as a nilad:
                                 ¤           -     nilad followed by link(s) as a nilad:
                              ⁶              -       literal space
                                ⁵            -       literal 10
                               ẋ             -       repeat: "          "
                            ⁷                -     literal new line
                             ,               -     pair: ['\n',"          "]
                                     9       -   literal 9
                                    ṁ        -   mould like: ['\n',"          ",'\n',"          ",'\n',"          ",'\n',"          ",'\n']
                           "                 - zip with:
                          ;                  -   concatenation
                                             -     e.g. [" Happy birth\n","o          ","d\n","c          ","a\n","c          ","y\n","eC eleaffaR           ","\n"])
                                      Ȯ      - print and yield
                                         .   - literal 0.5
                                       œS    - after sleeping right seconds yield left
                                          ®  - recall value from register (s rotated by 1)
                                           ß - call this link (1) with the same arity (as a monad)

HTML + ES6, 200 bytes

<pre id=o><script>setInterval(_=>o.innerHTML=(f=k=>k--?f(k)+(k<11?s[k]:k>47?s[74-k]:k%12?++k%12?' ':s[10+k/12]+`
`:s[30-k/12]):'')(60,s=s.slice(1)+s[0]),99,s="Happy birthday Raffaele Cecco ")</script>

It looks great!

@LuisMendo That brings back memories, although I remember Cybernoid II better than the first one. I'm sure I've seen this effect in a couple of cracktros as well. ;-)

Yes, I also preferred the second :-)

ZX Spectrum BASIC, 187 bytes
Annoyed that Philip beat me to it by a couple of minutes :-) Numbers like \{15} are unprintable control codes - compile with zmakebas if you want to tinker. Note that the full rectangle isn't printed immediately, but it falls into place after the first few frames.
1 let a$=" Happy birthday Raffaele Cecco":dim b$(code"\{15}"):dim c$(pi*pi)
3 let b$=a$(sgn pi)+b$:let a$=a$(val"2" to)+a$(sgn pi):print "\{0x16}\{0}\{0}";a$(to code"\{12}")'b$(sgn pi);c$;a$(val"13")'b$(val"2");c$;a$(code"\{14}")'b$(pi);c$;a$(len b$)'b$(val"4" to):go to pi

Try it here (online JS-emulated version, press enter to start)... http://jsspeccy.zxdemo.org/cecco/
You can also save four bytes by clearing the screen between frames instead of doing a PRINT AT, but it's too flickery to be worth it...
1 let a$=" Happy birthday Raffaele Cecco":dim b$(code"\{15}"):dim c$(pi*pi)
3 let b$=a$(sgn pi)+b$:let a$=a$(val"2" to)+a$(sgn pi):cls:print a$(to code"\{12}")'b$(sgn pi);c$;a$(val"13")'b$(val"2");c$;a$(code"\{14}")'b$(pi);c$;a$(len b$)'b$(val"4" to):go to pi

Ah, but you win by a lot of bytes :-)

Welcome to PPCG!

Welcome to the game. ZX is always good to see. Nice answer. +1.

V, 75 71 70 bytes
4 bytes saved thanks to @DJMcMayhem
iHappy birthd
±± a
o±° y
c±±
ceC eleaffaR6ògÓÉ {dêjP2Ljjx1Lp5LxkpGd

Here is a TIO link, but note that this will not work on TIO because the program loops infinitely. Try it online!
Since this code contains unprintables, here is a hexdump.
00000000: 6948 6170 7079 2062 6972 7468 640a b1b1  iHappy birthd...
00000010: 2061 0a6f b1b0 2079 0a63 b1b1 200a 6365   a.o.. y.c.. .ce
00000020: 4320 656c 6561 6666 6152 1b36 f267 d3c9  C eleaffaR.6.g..
00000030: 207b 64ea 6a50 324c 166a 6a78 314c 7035   {d.jP2L.jjx1Lp5
00000040: 4c78 6b70 4764                           LxkpGd

The sleep time is 500 milliseconds.

Can you give a TIO link?

Some tips (not all tested): H| --> {. <C-v>êx --> dê, and 5L --> }

Also, your repchar commands are all using 9 when you could use 10 or 11. For example: change the middle three lines to ±± a, o° y, and c±±<space>

@DJMcMayhem Everything works but 5L => }.

@Riker Done, but note that the TIO link cannot show the animation

SVG(HTML5), 267 bytes

<svg width=200 height=90><defs><path id=p d=M40,20h120v50h-120v-50h120v50h-120v-50></defs><text font-size="19" font-family="monospace"><textPath xlink:href=#p>Happy birthday Raffaele Cecco<animate attributeName=startOffset from=340 to=0 dur=5s repeatCount=indefinite>

Well, it is rectangular, and it is a marquee, and it is ASCII text...

... and it runs smooooth :-)

ZX Spectrum BASIC, 274 bytes
Well, someone had to do it. Pedants may wish to disqualify this for being too slow and not having a pause between animations, but I'm claiming a special case here :-)
10 LET m$=" Happy birthday Raffaele Cecco": LET o=0: LET l=LEN m$: LET f=4: LET t=12: LET a=t+f: LET b=27
20 FOR j=SGN PI TO l: LET i=j+o: IF i>l THEN LET i=i-l
40 LET x=(i-SGN PI AND i<=t)+(11 AND i>t AND i<=a)+(b-i AND i>a AND i<=b)
50 LET y=(i-t AND i>t AND i<=a)+(f AND i>a AND i<=b)+(b+f-i AND i>b): PRINT AT y,x;m$(j): NEXT j
80 LET o=o+SGN PI: IF o>=l THEN LET o=o-l
90 GO TO t

Not very golfed either. 274 bytes is the number of bytes saved by the Spectrum to tape when saving this program.

You went to all the trouble of using SGN PI for 1 (saves 5 bytes) but you forgot NOT PI for 0 and VAL for the other constants...

NOT PI I just missed. Deliberately didn't do VAL as it was slow enough as it was, and VAL is horribly slow.

ZX Basic always gets an upvote from me. No pedantism here. I remember the good old days... Nice answer.

PHP, 184 bytes
for($r=" ";++$i;sleep(print chunk_split(str_pad($r,96,"
",0),12)),$r=$k="0")for(;$c="ABCDEFGHIJKWco{zyxwvutsrqpdXL@"[$k];)$r[ord($c)-64]="Happy Birthday Raffaele Cecco "[($i+$k++)%30];

prints 39 newlines to clear the screen; run with -nr.
The actual pause is 1 second; but I sped up the gif.

ungolfed
$p = "ABCDEFGHIJKWco{zyxwvutsrqpdXL@";  # (positions for characters)+64 to ASCII
$t = "Happy Birthday Raffaele Cecco ";  # string to rotate
for($r=" ";                     # init result to string
    ++$i;                       # infinite loop
    $r=$k="0")                      # 6. reset $r and $k
{
    for(;$c=$p[$k];)                # 1. loop through positions
        $r[ord($c)-64]=                 # set position in result
        $t[($i+$k++)%30];               # to character in string
    sleep(                          # 5. wait 1 second
        print                       # 4. print
            chunk_split(
            str_pad($r,96,"\n",0)   # 2. pad to 96 chars (prepend 36 newlines)
            ,12)                    # 3. insert newline every 12 characters
        );
}

Python 2, 230 184 bytes
import time
s='Happy birthday Raffaele Cecco '*2
i=0
while[time.sleep(1)]:print'\n'*30+'\n'.join([s[i:i+12]]+[s[i-n]+' '*10+s[i+11+n]for n in 1,2,3]+[s[(i+15)%30:][11::-1]]);i+=1;i%=30

Try it at repl.it

Python 2, 218 200 190 181 176 bytes
import time;f='Happy birthday Raffaele Cecco '
while[time.sleep(1)]:v=f[::-1];print'\n'*90,f[:12],''.join('\n'+a+' '*10+b for a,b in zip(v[:3],f[12:16])),'\n',v[3:15];f=f[1:]+f[0]

-18 bytes by removing str formatting
-10 bytes, thanks to @Uriel and @ElPedro suggestions
-9 bytes by removing negative indexing
-5 bytes by storing reversed f as v and while condition
repl.it

You can cut the whitespace between while 1: and print and replace the next ; with an (actual) newline. Also f='H... Also f[:1] is actualy f[0].

OP states that time can be anything between 0.1 and 1 seconds so why not time.sleep(1) to take it under 200?

Python 3, 160 bytes
import time;s="Happy_birthday_Raffaele_Cecco_"
while[time.sleep(1)]:print(s[:12]+'\n%s%%11s'*3%(*s[:-4:-1],)%(*s[12:15],)+'\n'+s[-4:14:-1]+'\n'*30);s=s[1:]+s[0]

Try it online! (No animation)

I kinda knew you would come in and beat me with Python. I was doing so well!  At least mine makes use of "bugs" that you can't use with Python 3 :-). Nice answer as always. +1

05AB1E, 43 bytes
[Ž-∊13в.•:=r}ƒyp$γ•™“ŽØ¢© ÿ“.ªN._Ž9¦S.Λ,т.W

What better time to answer a birthday related challenge than on your own birthday. ;)
Outputs and rotates in a similar matter as the challenge description; sleeps for 100 ms in between iterations (could alternatively sleep for 255 ms, 256 ms, or 1 second for the same byte-count by replacing the т with ₅, ₁, or ₄ respectively). Prints each iteration as a loose output (so without clearing the console and overwriting).
Try the first \$n\$ iterations online (without sleep).
Or as gif in my local console:

Explanation:
[                        # Loop indefinitely:
 Ž-∊                     #  Push compressed integer 27370
    13в                  #  Convert it to base-13 as list: [12,5,12,5]
 .•:=r}ƒyp$γ•            #  Push compressed string "raffaele cecco "
             ™           #  Titlecase the words: "Raffaele Cecco "
              “ŽØ¢© ÿ“   #  Push compressed string "happy birthday ÿ",
                         #  where `ÿ` is automatically filled with the top of the stack:
                         #   "happy birthday Raffaele Cecco "
                      .ª #  Sentence capitalize it, leaving existing caps intact:
                         #   "Happy birthday Raffaele Cecco "
  N._                    #  Rotate the characters in this string the 0-based loop-index
                         #  amount of times towards the left
 Ž9¦                     #  Push compressed integer 2460
    S                    #  Convert it to a list of digits: [2,4,6,0]
 .Λ                      #  Use the Canvas builtin with these three options
   ,                     #  Pop and print it with trailing newline
 т.W                     #  Sleep for 100 milliseconds

See this 05AB1E tip of mine to understand why “ŽØ¢© ÿ“ is "happy birthday ÿ"; .•:=r}ƒyp$γ• is "raffaele cecco "; Ž-∊ is 27370; Ž9¦ is 2460; and Ž-∊13в is [12,5,12,5].
As for the Canvas builtin: it takes three arguments to draw a shape:

Character/string to draw: the potentially rotated "Happy birthday Raffaele Cecco " in this case
Length of the lines we'll draw: the list [12,5,12,5]
The direction to draw in: [2,4,6,0]. The digits in the range [0,7] each represent a certain direction:

7   0   1
  ↖ ↑ ↗
6 ← X → 2
  ↙ ↓ ↘
5   4   3

So the [2,4,6,0] in this case translates to the directions \$[→,↓,←,↑]\$.
here a step-by-step explanation of the output for the initial state:
Step 1: Draw 12 characters ("Happy birthd") in direction 2→:
Happy birthd

Step 2: Draw 5-1 characters ("ay R") in direction 4↓:
Happy birthd
           a
           y

           R

Step 3: Draw 12-1 characters ("ceC eleaffa") in direction 6←:
Happy birthd
           a
           y

ceC eleaffaR

Step 4: Draw 5-1 characters ("co H") in direction 0↑:
Happy birthd
           a
o          y
c
ceC eleaffaR

See this 05AB1E tip of mine for an in-depth explanation of the Canvas builtin.

Happy birthday!

@Kevin

@Razetime Thank you. :)

@LuisMendo Thank you. :)

Python 2, 182 179 173 160 bytes
i="Happy birthday Raffaele Cecco "
while[s for s in i*18**4]:print'\n'*99,'\n'.join([i[:12]]+[i[-z]+' '*10+i[11+z]for z in 1,2,3]+[i[15:-3][::-1]]);i=i[1:]+i[0]

Try it at repl.it
Doesn't work on TIO so my first attempt at using repl.it
Edit Using a "time-wasting" loop to count to 1000000 gives a consistent delay of between 0.1 and 1s on my machine and on repl.it and saves importing time. I guess if you ran it on an old 286 computer with 64MB RAM it may go over the 1 second but I'm pretty sure that's not going to happen. If it does then simply reduce the 1000000 and save me a couple of bytes :-)
Edit 2 -6 for remembering that list comprehensions in Python 2 leak the last value of s so I can use it later and also remembering that pretty well anything other than 0 and "" is truthy. Bugs or features? Don't care. It's saved me 6 bytes :-)
Edit 3 Another 13 by revering the rotation and by using a list comprehension for the middle rows inside the join and changing 3000000 to 40**4. Thanks to @FelixDombek for the last one. Had to lose my list comprehension trick though.

Could you use scientific notation or a power expression for the big number?

Power expression yes, scientific notation no (because it becomes a float, which you can't multiply with strings).

Obligatory 999999 instead of 1000000 for a byte :V

Thanks @ValueInk but by using the leaky list comprehension "bug" I actually had to increase to 3000000 and still saved 3 bytes :-)

Unfortunately no. @L3viathan is right on that one.

Ruby + GNU Core Utils, 136 bytes
s='Happy birthday Raffaele Cecco '
loop{puts`clear`+s[0,12],(0..2).map{|i|s[~i]+' '*10+s[12+i]},s[15,12].reverse
s=s[1,29]+s[0];sleep 1}

ZX81 Z80 machine code, 158 130 bytes
OK so it has a lot of bytes until it is assembled but then it drops to 130 bytes. Not sure if that breaks any rules? Its my first post and only as a guest.
The program uses 'brute force' to display the message rather than clever function use as can be seen from the way it has separate code chunks for the top line, the right hand vertical, the bottom line and the left hand vertical.
The animation is achieved by rotating the contents of the message and then just displaying it after a short delay which should be pretty much exactly 0.2 seconds as it waits for 10 frames out of a rate of 50 (for UK spec Zeddys anyway).
I have to credit kmurta for the concept of rotating the message to get the animation - that saved 28 bytes!!!
main
  ld hl,happyBirthday           ;load the address of the message
  ld de,(D_FILE)                ;load the base of screen memory
  inc de                        ;increase it by one to bypass the $76
  ld bc,12                  ;ready for 12 loops
  ldir                      ;transfer HL to DE 12 times and increase both accordingly
  ex de,hl                  ;put HL into DE (HL was the message position)
  ld b,4                        ;prepare to loop 4 times
  dec hl                        ;decrease HL (screen location) by 1
rightVertical
  push de                       ;save the character position
  ld de,13                  ;load 13 (for the next line)
  add hl,de                 ;add to HL
  pop de                        ;get the message position back
  ld a,(de)                 ;load the character into A
  ld (hl),a                 ;save it to HL
  inc de                        ;increase the character position
  djnz rightVertical            ;repeat until B = 0
  dec hl                        ;decrease HL (screen location) by 1 to step back from the $76 char
  ld b,11                       ;prepare for 11 loops
lastLine
  ld a,(de)                 ;load the current character into A
  ld (hl),a                 ;save to the screen
  dec hl                        ;decrease the screen position (as we are going backwards)
  inc de                        ;increase character position
  djnz lastLine             ;repeat until B = 0
  ld b,3                        ;get ready for the left vertical
  inc hl                        ;increase the screen position by 1 as we have gone 1 too far to the left and wrapped to the line above
leftVertical
  push de                       ;save the character position
  ld de,13                  ;load 13 (for the next line)
  sbc hl,de                 ;subtract it to move up a line in memory
  pop de                        ;get the character pos back
  ld a,(de)                 ;load the character
  ld (hl),a                 ;save it to the screen
  inc de                        ;next character
  djnz leftVertical         ;repeat until B = 0
delayCode
  ld   hl,FRAMES                ;fetch timer
  ld   a,(hl)                 ;load into A
  sub  10                       ;wait 10 full frames (0.2 of a second)
delayLoop
  cp  (hl)                  ;compare HL to 0
  jr   nz,delayLoop         ;if not 0 then repeat until it is
shuffleMessage
  ld a, (happyBirthday)     ;load the first character of the message
  push af                       ;save the first character of the message
  ld hl, happyBirthday      ;load the address of the message
  inc hl                        ;increase by one to get the second char
  ld de, happyBirthday      ;load the start of the message
  ld bc, 29                 ;number of times to loop
  ldir                      ;load HL (char 2) into DE (char 1) and repeat
  pop af                        ;get char 1 back
  ld (de),a                 ;out it at the end of the string
  jr main                       ;repeat
happyBirthday
    DEFB    _H,_A,_P,_P,_Y,__,_B,_I,_R,_T,_H,_D,_A,_Y,__,_R,_A,_F,_F,_A,_E,_L,_E,__,_C,_E,_C,_C,_O,__

Sorry I can't post a link to it running as it is a compiled program in the .P format for EightyOne (or other emulators) or an actual Zeddy if you have a ZXPand or similar to load it.
The .P can be downloaded at
http://www.sinclairzxworld.com/viewtopic.php?f=11&t=2376&p=24988#p24988

Nice answer! I was missing one in Z80 machine code :-) And welcome to the site!

Could you maybe provide a gif of the program running?

Sorry - I don't have any gif creating software!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
K-Means Clustered Golf
K-Means Clustering (Wikipedia)
The task here is rather simple, perform a single iteration of a k-means clustering algorithm on a binary matrix. This is essentially the setup task for the main k-means algorithm, I felt the setup might be easier and entice golfing languages to give it a shot as well. The matrix passed to you will have the following format:
 0 0 0 0 0 0 0 0 1
 0 1 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 1
 0 0 1 0 0 0 0 0 0
 0 0 0 0 0 1 0 0 1
 0 0 0 0 0 0 0 0 0
 0 1 0 0 0 0 0 0 0
 0 1 0 0 0 1 0 0 0
 0 1 0 0 0 0 0 0 1
 0 0 0 0 0 0 0 0 0

1 represents a point, while 0 represents a lack of points. Your job will be to randomly generate k-1 centroids and perform the initial clustering of the data around the centroids you've generated. k is defined as min(grid#Width, grid#Height)-1. The labeling of each centroid should go from 2 until k. For instance, in this scenarios you could generate the following centroids:
Centroid 2 was generated at: (1.0, 4.0)
Centroid 3 was generated at: (1.0, 5.0)
Centroid 4 was generated at: (5.0, 1.0)
Centroid 5 was generated at: (3.0, 3.0)
Centroid 6 was generated at: (0.0, 2.0)
Centroid 7 was generated at: (6.0, 6.0)
Centroid 8 was generated at: (2.0, 6.0)

After generating the centroids, you must loop through each and every point that is marked with a 1, as we can treat the ones marked with 0 as empty space. For each centroid, you must decide which centroid is the closest to the point in question. Here's the distances for the example:
(0,8) distance from centroid 2 is 4.123105625617661
(0,8) distance from centroid 3 is 3.1622776601683795
(0,8) distance from centroid 4 is 8.602325267042627
(0,8) distance from centroid 5 is 5.830951894845301
(0,8) distance from centroid 6 is 6.0
(0,8) distance from centroid 7 is 6.324555320336759
(0,8) distance from centroid 8 is 2.8284271247461903
(1,1) distance from centroid 2 is 3.0
(1,1) distance from centroid 3 is 4.0
(1,1) distance from centroid 4 is 4.0
(1,1) distance from centroid 5 is 2.8284271247461903
(1,1) distance from centroid 6 is 1.4142135623730951
(1,1) distance from centroid 7 is 7.0710678118654755
(1,1) distance from centroid 8 is 5.0990195135927845
(2,8) distance from centroid 2 is 4.123105625617661
(2,8) distance from centroid 3 is 3.1622776601683795
(2,8) distance from centroid 4 is 7.615773105863909
(2,8) distance from centroid 5 is 5.0990195135927845
(2,8) distance from centroid 6 is 6.324555320336759
(2,8) distance from centroid 7 is 4.47213595499958
(2,8) distance from centroid 8 is 2.0
(3,2) distance from centroid 2 is 2.8284271247461903
(3,2) distance from centroid 3 is 3.605551275463989
(3,2) distance from centroid 4 is 2.23606797749979
(3,2) distance from centroid 5 is 1.0
(3,2) distance from centroid 6 is 3.0
(3,2) distance from centroid 7 is 5.0
(3,2) distance from centroid 8 is 4.123105625617661
(4,5) distance from centroid 2 is 3.1622776601683795
(4,5) distance from centroid 3 is 3.0
(4,5) distance from centroid 4 is 4.123105625617661
(4,5) distance from centroid 5 is 2.23606797749979
(4,5) distance from centroid 6 is 5.0
(4,5) distance from centroid 7 is 2.23606797749979
(4,5) distance from centroid 8 is 2.23606797749979
(4,8) distance from centroid 2 is 5.0
(4,8) distance from centroid 3 is 4.242640687119285
(4,8) distance from centroid 4 is 7.0710678118654755
(4,8) distance from centroid 5 is 5.0990195135927845
(4,8) distance from centroid 6 is 7.211102550927978
(4,8) distance from centroid 7 is 2.8284271247461903
(4,8) distance from centroid 8 is 2.8284271247461903
(6,1) distance from centroid 2 is 5.830951894845301
(6,1) distance from centroid 3 is 6.4031242374328485
(6,1) distance from centroid 4 is 1.0
(6,1) distance from centroid 5 is 3.605551275463989
(6,1) distance from centroid 6 is 6.082762530298219
(6,1) distance from centroid 7 is 5.0
(6,1) distance from centroid 8 is 6.4031242374328485
(7,1) distance from centroid 2 is 6.708203932499369
(7,1) distance from centroid 3 is 7.211102550927978
(7,1) distance from centroid 4 is 2.0
(7,1) distance from centroid 5 is 4.47213595499958
(7,1) distance from centroid 6 is 7.0710678118654755
(7,1) distance from centroid 7 is 5.0990195135927845
(7,1) distance from centroid 8 is 7.0710678118654755
(7,5) distance from centroid 2 is 6.082762530298219
(7,5) distance from centroid 3 is 6.0
(7,5) distance from centroid 4 is 4.47213595499958
(7,5) distance from centroid 5 is 4.47213595499958
(7,5) distance from centroid 6 is 7.615773105863909
(7,5) distance from centroid 7 is 1.4142135623730951
(7,5) distance from centroid 8 is 5.0990195135927845
(8,1) distance from centroid 2 is 7.615773105863909
(8,1) distance from centroid 3 is 8.06225774829855
(8,1) distance from centroid 4 is 3.0
(8,1) distance from centroid 5 is 5.385164807134504
(8,1) distance from centroid 6 is 8.06225774829855
(8,1) distance from centroid 7 is 5.385164807134504
(8,1) distance from centroid 8 is 7.810249675906654
(8,8) distance from centroid 2 is 8.06225774829855
(8,8) distance from centroid 3 is 7.615773105863909
(8,8) distance from centroid 4 is 7.615773105863909
(8,8) distance from centroid 5 is 7.0710678118654755
(8,8) distance from centroid 6 is 10.0
(8,8) distance from centroid 7 is 2.8284271247461903
(8,8) distance from centroid 8 is 6.324555320336759

The final result of the clustering algorithm is that there should be no 1s remaining in the matrix, only centroid numbers. This is why it was important to label the centroids from 2-k+1, allowing us to replace them, as follows:
 0 0 0 0 0 0 0 0 8
 0 6 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 8
 0 0 5 0 0 0 0 0 0
 0 0 0 0 0 5 0 0 7
 0 0 0 0 0 0 0 0 0
 0 4 0 0 0 0 0 0 0
 0 4 0 0 0 7 0 0 0
 0 4 0 0 0 0 0 0 7
 0 0 0 0 0 0 0 0 0

This is the initial clustering layout for 7 centroids on the provided grid, given randomly generated centroids. Your job is to output the clustered version of the binary input grid.
Rules

The k-1 centroids must be randomly generated and should be anywhere from (0,0) to (grid#Width, grid#Height).

The value of k is min(grid#Width, grid#Height)-1.
The centroids generated MUST be numbered from 2 to k.

The input format MUST be a grid of 0s and 1s, where 0s represent empty space and 1s represent points.

A grid is either a string using 1-char per cell and \n as row delimiters or a 2D array.
The grid passed is not guaranteed to be square, but it is guaranteed to not be empty.

The final output can either use arrays or a delimited string.
Shortest code wins, this is code-golf.

Related.

APL (Dyalog Unicode), 61 50 bytes
⍴⍴,{⍺\1+{⊃⍸⍵=⌊/⍵}¨↓⍵}⍸∘.(+.×⍨-)⌊/∘⍴{⍵[1↓⍺?⍴⍵]}∘⍸=⍨

Try it online!
-11 bytes thanks to Bubbler
How it Works
          ⍝ Implicitly take binary matrix G as input
⍸=⍨       ⍝ Yield all (1-indexed) coordinates from (1,1) to (w,h)
⌊/∘⍴      ⍝ k+1=min(w,h)
{...}     ⍝ Choose k centroids:
 ?          ⍝ Randomly choose
 ⍺          ⍝ k+1 distinct indices
 ⍴⍵         ⍝ from the array of w×h possible indices
 1↓         ⍝ Drop the first so there are only k indices
 ⍵[...]     ⍝ index into the array of w×h coordinates
∘.        ⍝ Outer product of
            ⍝ the k centroids with
 ⍳          ⍝ the coordinates of all of the "1"s in G
 (+.×⍨-)    ⍝ with operator: distance squared
{...}¨↓   ⍝ For each row (point)
 ⊃⍸⍵=⌊/⍵    ⍝ Find the index of the centroid with smallest distance
            ⍝ (breaks ties by choosing lower numbers → small bias toward lower centroid numbers)
1+        ⍝ Add 1 to shift centroid numbers to [2,k]
          ⍝ Now we have a list of the centroid numbers for the "1"s, in reading order
⍺\         ⍝ Expand to prototype array:
,         ⍝ Prototype array is flattened G (Expand \ throws RANK ERROR for non-vector left argument)
⍴     ⍝ Reshape back to
⍴     the shape of G

If you use dfn form, you can quickly transform parts of it into tacit, e.g. {(⍴⍵)⍴...} would be ⍴⍴{...}. Tacitifying everything that would remove parens gives 50 bytes.

Mathematica 109 Bytes
If I understand the question correctly, something like this ought to work. "KMeans" is one of the built in methods to FindClusters and ClusteringComponents.
SparseArray[Thread[(p=Position[#,1])->1+ClusteringComponents[p,Min[d=Dimensions@#]-1,1,Method->"KMeans"]],d]&

Usage:
%@in//MatrixForm to get visualization, in is an integer array.