Problem M. Match Schedule

Author:И. Блинов   Time limit:1 sec
Input file:Standard input   Memory limit:512 Mb
Output file:Standard output  

Statement

There are n teams participating in a football tournament. Each team plays against every other team exactly once. The goal is to arrange the matches such that, for each team, the number of home matches differs from the number of away matches by no more than 1.

You are required to output the schedule in the form of an n × n table. The i-th row should describe the matches of the i-th team, where:

Input format

The first line of input contains a single integer n, representing the number of teams.

Output format

Output n lines, each containing n characters ('H', 'A', or 'X'), describing the desired match schedule. The match schedule must be consistent, meaning there are no contradictions.

Constraints

1 ≤ n ≤ 100

Sample tests

No. Standard input Standard output
1
5
XAAHH
HXAAH
HHXAA
AHHXA
AAHHX
2
2
XA
HX

0.137s 0.010s 13