Author: | И. Блинов | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 512 Mb | |
Output file: | Standard output |
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:
The first line of input contains a single integer n, representing the number of teams.
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.
1 ≤ n ≤ 100
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|