# Python 2, 105 bytes # s="ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2 for i in range(51):print s[:i]+s[i::-1]if 26>i else s[:-i-1]+s[-i-3::-1] [Run it][1] [1]: https://ideone.com/jv2wLB Thanks to @**LeakyNun** and @**manatwork** for pointing out a few byte saves.