R, 88 86 bytes
cat(intToUtf8(rbind(diffinv(matrix(c(66,-32,-31),25,5,T)[,1:3],,,t(c(32,65,97))),10)))
R is terrible at string manipulation and although it has some neat matrix builtins, rotations are another thing it doesn't do very easily. I will happily give a bounty to anyone who can out-golf me in R.
Despite my having found a shorter answer, I'll still award a 50 rep bounty to the first other R answer shorter than 88 bytes.
I suppose I'd award myself the bounty if I could, but this is a whole two bytes shorter than the "boring" answer! I avoid rotations by just using R's penchant for recycling.
To get here, I deconstructed the desired output to their ASCII code points with utf8ToInt
(removing the newlines), built a matrix, and ran a diff
on themm getting the columnwise differences. Noting the periodicity there, I set out to construct the matrix in a golfy fashion, hoping to use diffinv
to recreate the original.
Thanks to the periodicity, we can recreate the diff
ed matrix by forcing R to recycle with a non-multiple length, and extract the columns we actually wanted:
matrix(c(66,-32,-31),25,5,T)[,1:3]
Then we invert this process, with diffinv
to recreate the code points, append a row of 10
(newlines) to the bottom, reconvert to ASCII with intToUtf8
, and cat
the result.