Page not loading? Try clicking here.
Placeholder

#1331

Character rhombus 1s 64MB

Problems

Given the length N of one side of a rhombus, write a program that prints a character rhombus as described below.

Conditions

  1. Start from the center of the first row and fill characters in counterclockwise order starting from 'A'. After 'Z', continue again from 'A'.

  2. After filling the outer layer, move to the center of the next row and repeat the same process.

  3. Continue in this manner until the entire rhombus is filled.


Input

A single integer ๐‘ is given, representing the length of one side of the rhombus.

๐‘ is a positive integer not exceeding 100.


Output

Print the character rhombus with side length ๐‘ according to the given pattern.

Separate characters with a single space.

Note: Do not print null characters ('NULL', '\0') in the output.


Example #1

2
  A
B E D
C

Example #2

3
    A
B I H
C J M L G
D K F
E

Example #3

4
ย ย ย ย ย ย A

B M L
C N U T K
D O V Y X S J
E P W R I
F Q H
G


Source

JUNGOL

You must sign in to write code.