Brachylog, 3737 29 bytes
Credits to Fatalize for his assistance throughout.
4 bytes thanks to Fatalize, and inspiration for another 4 bytes.
@A:1fb:2&~@nw ~c[A:B],A1&e:1"a"yr:2yt.1&cw@Nw\ :Lc.r.! Predicate 0 (Main predicate)
@A:1fb1&e:2&~@nw"a"yr:1&cw@Nw\ @A:1f1& Find all solutions of Apply predicate 1 withto @A, aswhich inputis @A is basically "abcdefghijklmnopqrstuvwxyz" be Remove the first Choose one (it'selement from the emptyresult string(choice point) :2&"a"yr Call predicate 2 with the above as input generate substring from element to "a" ~@n :1& Join by newlines apply predicate 1 c concatenate w Print write to STDOUT Predicate 1 (Auxiliary predicate 1)
~c[A:B],A:1:2yt. ~C[A:B] input is in the form of@Nw [A:B] write "\n" to STDOUT (pattern matching\ hax) Backtrack to last choice point to ,choose and A:1:2yt. output isanother theelement firstuntil outputthere is no more from predicate 2 with Achoice asleft, inputthen halt. Predicate 21 (Auxiliary predicate 2)
This basically builds a palindrome from the given string/array.
:Lc.r.! :Lc. output is [input:L] .r. output reversed is still output ! stop searching after the first output