#Lutece1607. 大学生足球联赛

大学生足球联赛

Migrated from Lutece 1607 大学生足球联赛

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

大学生足球联赛火热来袭,共有NNNN为偶数)支大学球队报名参加了这次比赛。联赛采取单循环制,每只球队需要跟其他N1N-1支球队交手一次。赛事共有N1N-1轮,每轮有N2\frac{N}{2}场比赛,每一轮每支球队都得出场比赛。你是本届赛事的负责人,队伍的编号为11~NN,请你安排一个NN支球队N1N-1轮的赛程表。

Input

一个整数NN,代表报名参赛的大学球队数。(2N66)(2 \leq N \leq 66)

Output

输出共有N1N-1行,第ii行代表第ii轮的对阵情况。

对于每一行,共有NN个数,用空格相隔,其中第2×j12 \times j-1个数和第2×j2 \times j个数代表该轮第jj组比赛对阵。

赛程表有很多种可能,你只需输出任意一组合法的赛程表即可。

Samples

2
1 2
4
1 2 3 4
1 3 2 4
1 4 2 3
6
1 2 3 4 5 6
1 3 2 5 4 6
1 4 2 6 3 5
1 5 2 4 3 6
1 6 2 3 4 5

Note

样例1122支球队11轮赛程表为:

11轮:121-2

样例2244支球队33轮赛程表为:

11轮:12 341-2\ 3-4

22轮:13 241-3\ 2-4

33轮:14 231-4\ 2-3

样例3366支球队55轮赛程表为:

11轮:12 34 561-2\ 3-4\ 5-6

22轮:13 25 461-3\ 2-5\ 4-6

33轮:14 26 351-4\ 2-6\ 3-5

44轮:15 24 361-5\ 2-4\ 3-6

55轮:16 23 451-6\ 2-3\ 4-5

Resources

2017 UESTC Training for Dynamic Programming