# Description

Output the rhyme scheme for a very long Terza Rima.

None.

# Output

ABA
BCB
CDC
DED
EFE
FGF
GHG
HIH
IJI
JKJ
KLK
LML
MNM
NON
OPO
PQP
QRQ
RSR
STS
TUT
UVU
VWV
WXW
XYX
YZY


# Rules

You can pick between separating stanzas with whitespace or newlines, so either:

ABA BCB...


OR

ABA
BCB
...


A single trailing whitespace allowed per line and one trailing newline allowed.

Output can be either uppercase or lowercase.

This is , so the shortest code in bytes for each language wins.

• Is a list of lines okay? Dec 18, 2017 at 16:23
• According to en.wikipedia.org/wiki/Terza_rima your ending is wrong. It should end with either Z or ZZ. Dec 18, 2017 at 18:28
• Can there be additional output beyond the rhyme scheme? This might save me a few bytes. Dec 18, 2017 at 23:02
• @NK1406 Nope sorry. Dec 19, 2017 at 7:13
• @totallyhuman String array is fine. Dec 19, 2017 at 7:14

# K (oK), 17 16 bytes

Solution:

c$010b+/:65+!25  Try it online! Explanation: Might be a better way, but this is what I came up with: c$010b+/:65+!25 / the solution
!25 / til 25 => 0..24
65+    / add 65 -> 65..89
+/:       / add left to each right
010b          / boolean array of 0 1 0
c$/ cast to ASCII characters  # K4, 15 bytes Solution: +-1 1 -1_\:.Q.A  Explanation: Take A..Z, drop the last/first/last elements and then transpose: +-1 1 -1_\:.Q.A / the solution .Q.A / "ABCDEFGHIJKLMNOPQRSTUVWXYZ" _\: / drop (_) each-left from the right argument -1 1 -1 / the list (-1;1;-1) + / flip  # GolfScript, 17 bytes 90,65>''+{.).(n}%  Try it online! # Explanation 90,65> # Yield the uppercase alphabet ''+ # Convert to a string { }% # For every codepoint in the string: .) # Push the codepoint incremented .( # Push the codepoint decremented n # Push a newline  # naz, 60 bytes 8a8m2x1v2d3m7s2x2v1x1f1v1a1o1a1o1s1o2x1v0m9a1a1o1v3x2v1l0x1f  Explanation (with 0x commands removed) 8a8m2x1v # Set variable 1 equal to 64 ("@") 2d3m7s2x2v # Set variable 2 equal to 89 ("Y") 1x1f # Function 1 1v # Load variable 1 into the register 1a1o1a1o1s1o # Output the next line of the rhyme scheme 2x1v # Store the value of the register in variable 1 0m9a1a1o # Output a newline 1v # Load variable 1 into the register 3x2v1l # Jump back to the start of the function # if the value in the register is less than variable 2 1f # Call function 1  # Python 3, 49 47 bytes An obvious golf saved 2 bytes: ' '.join('%c'*3%(x,x+1,x)for x in range(65,90))  Try it online # Forth (gforth), 55 53 46 bytes : f 90 65 do i i 1+ i emit emit emit cr loop ;  Try it online! -6 bytes from bubbler. a simple loop. # Deadfish~, 674 bytes {iiiiii}iiiiicicdc{ddddd}dddddc{iiiii}iiiiiicicdc{ddddd}ddddddc{iiiiii}dddcicdc{dddddd}iiic{iiiiii}ddcicdc{dddddd}iic{iiiiii}dcicdc{dddddd}ic{iiiiii}cicdc{dddddd}c{iiiiii}icicdc{dddddd}dc{iiiiii}iicicdc{dddddd}ddc{iiiiii}iiicicdc{dddddd}dddc{iiiiii}iiiicicdc{dddddd}ddddc{iiiiii}iiiiicicdc{dddddd}dddddc{iiiiii}iiiiiicicdc{dddddd}ddddddc{{i}ddd}dddcicdc{{d}iii}iiic{{i}ddd}ddcicdc{{d}iii}iic{{i}ddd}dcicdc{{d}iii}ic{{i}ddd}cicdc{{d}iii}c{{i}ddd}icicdc{{d}iii}dc{{i}ddd}iicicdc{{d}iii}ddc{{i}ddd}iiicicdc{{d}iii}dddc{{i}ddd}iiiicicdc{{d}iii}ddddc{{i}ddd}iiiiicicdc{{d}iii}dddddc{{i}ddd}iiiiiicicdc{{d}iii}ddddddc{{i}dd}dddcicdc{{d}ii}iiic{{i}dd}ddcicdc{{d}ii}iic{{i}dd}dcicdc  Try it online! # Stax, 6 bytes ╢#^↔2f  Run and debug it # Vyxalj, 12 bytes kA:2l$Zƛfṅ;Ṫ


Try it Online!

Nice effort by @Ausername, +1 to them. I tried a different approach:

ka          # uppercase alphabet
:           # dup
2l          # pairwise
$# swap Z # zip ƛ # map f # flatten ṅ # join ; # close map Ṫ # slice without tail  Although not necessary, for beautification, I added the j flag. # Excel, 46 bytes ## Multiple lines =CONCAT(CHAR(ROW(65:89)*{1,1,1,0}+{0,1,0,10}))  ## One line =CONCAT(CHAR(ROW(65:89)*{1,1,1,0}+{0,1,0,32}))  ## 25 by 3 array of cells, 25 bytes =CHAR(ROW(65:89)+{0,1,0})  I don't think this follows the spirit of the challenge but it is shorter. # Uiua, 21 bytes ≡&p↘¯1⍉⍜⊙⊡↻.1↯3+@A⇡26  Pad # UiuaSBCS, 12 10 bytes ⊞+⇡25"ABA"  Try it! -2 bytes thanks to Lynn! • ⊞+⇡25"ABA" seems to work. – lynn Mar 24 at 0:16 • @Lynn Nice, thanks. Mar 24 at 0:43 # Pip-l, 7 bytes BWR_MPz  Attempt This Online! ### Explanation BWR_MPz z ; Lowercase alphabet MP ; Map this function to each adjacent pair of letters: B ; The second letter WR ; Wrapped in two copies of _ ; The first letter ; Autoprint the resulting list one element per line (-l flag)  # SOGL V0.12, 7 bytes ZZ«Z⁰Ij  Try it Here! # Standard ML (MLton), 62 bytes fun$90=""| $n=implode(map chr[n,n+1,n,32])^$(n+1);print($65);  Try it online! ### Ungolfed: fun f 90 = "" | f n = implode(map chr[n,n+1,n,32]) ^ f(n+1); print(f 65);  # VBA, 40 Bytes Anonymous VBE immediate window function that takes no input and outputs to the vbe immediate window. For i=65To 89:a=Chr(i):?a;Chr(i+1)a:Next  # Acc!!, 66 bytes Count i while i-25 { i+65 Write _ Write _+1 Write _ Write 0 }  Try it online! # ReRegex, 50 bytes >Z//>(.)(.)/$1$2$1 >$2/>ABCDEFGHIJKLMNOPQRSTUVWXYZ  Outputs in the form ABA BCB CDC...  Try it online! # uBASIC, 64 bytes 0ForI=65To89:A$=Left$(Chr$(I),1):?A$;Left$(Chr$(I+1),1);A$:NextI


Try it online!

# MY-BASIC, 48 bytes

For I=65 To 89
A=Chr(I)
Print A+Chr(I+1)+A;
Next


Try it online!

# Visual Basic .NET (Mono), 105 bytes

Module M
Sub Main
Dim I,S
For I=65 To 89
S=Chr(I)
Console.WriteLine(S+Chr(I+1)+S)
Next
End Sub
End Module


Try it online!

# Yabasic, 45 bytes

For I=65To 89
?Chr$(I)+Chr$(I+1)+Chr$(I) Next  Try it online! # Vim, 29 keypresses :h<_<CR>jjY<C-^>PVUqqy2llpi<CR><Esc>q25@qdj  ## PHP, 79 Bytes Try it online! Code (recursive function) function f($l=25){if($l>0){echo chr($l+65).chr($l+64).chr($l+65)."
".f($l-1);}}  Explanation function f($l=25){         #Running the function 25 times
if($l>0){ echo chr($l+65)    #start getting Z
.chr($l+64) # Y in the middle .chr($l+65)."  # with chr is still less bytes than str_pad
".f($l-1); #call the function with$l-1
#in that call we get the line with YXY
#the result works because its writen in the
#inverted order of the stack :D
}
}


# Small Basic, 92 bytes

A Script that takes no input and outputs to the TextWindow Object

For I=65To 89
c=Text.GetCharacter(i)
TextWindow.WriteLine(c+Text.GetCharacter(i+1)+c)
EndFor


Try it at SmallBasic.com! Requires IE/Silverlight

# PHP, 37 bytes

for($i=A;$i<Z;){echo$j=$i++,"$i$j
";}


Try it online!

# Rockstar, 65 bytes

X's65
while X-90
cast X into C
let X be+1
cast X into N
say C+N+C


Try it here (Code will need to be pasted in)

# Python 3, 60 bytes

for a in"abcdefghijklmnopqrstuvwxy":print(a+chr(ord(a)+1)+a)


Try it online!

# Vyxal, 18 bytes

₄‹ʁ(⟨n|n›|n⟩kAİṅ,)


Try it Online!

# Swift 5.9, 70 bytes

let f={$0%63>0 ?f($0-1333)+String(\$0,radix:36)+" ":""}
print(f(45358))
`

A direct Swift port of @Arnauld's JavaScript answer.