Letter Spiral Matrix


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

Given a positive integer n, print an n x n matrix in clockwise spiral order using letters A to Z repeatedly.

Input

  • One positive integer n.

Output

  • Letters on the same line are separated by exactly one space.

Constraints

  • 1 <= n <= 30

Example

Input
4
Output
A B C D
L M N E
K P O F
J I H G

Comments

There are no comments at the moment.