We almost overlooked one thing — Princess Asseylum needs to give her guests gifts! You have to help her wrap the gifts now! A wrapped gift can be represented as an square matrix of lowercase letters. The very center of the gift should be a
, and each other layer from inside out should have b
, c
, etc.
Input Specification
The first and only line of input will have the number of layers of the gift, .
Output Specification
You should output an matrix, the gift after it is wrapped.
Sample Input 1
2
Sample Output 1
bbb
bab
bbb
Sample Input 2
3
Sample Output 2
ccccc
cbbbc
cbabc
cbbbc
ccccc
Comments
So the letters increase with alphabetical order?
Yes.
What do we do if is even?
Not sure if we do this:
my formatting screwed up
cccc
cabc
cccc
Added as a sample case.
Input
Output
Oh never mind I thought was the diameter
diameter is 2n-1