Open air
Very easy
Execution time limit is 2 seconds
Runtime memory usage limit is 256 megabytes
You are given a full set of dominoes with two numbers from 0 to N (N — is even) written on each. There is only one exemplar of each pair of numbers {a, b} It's easy to count that amount of dominoes is .
Place all dominoes horizontally in N+1 row so, that sums of numbers on dominoes in each row are equal. Guaranteed, that it's always possible.
Input
Even number N in the only line.
Output
Output N+1 line with N+2 numbers in each: a_1, b_1, a_2, b_2, ..., a_k, b_k, k = , where each pair a_i, b_{i }corresponds to a domino. Use each domino only once. Pair of numbers on each domino can be written in any order. If there are multiple solutions, you may output any one.
Limits
2 ≤ N ≤ 100, N is even.
Examples
Input #1
Answer #1
Submissions 13
Acceptance rate 31%