use for loop to to make like this:
a
aba
abcba
abcdcda
abcdedcba