3y3s Challenge

AtCoder
IDrelay_i
Time2000ms
Memory256MB
Difficulty
There are $N$ persons, conveniently numbered $1$ through $N$. They will take _3y3s Challenge_ for $N-1$ seconds. During the challenge, each person must look at each of the $N-1$ other persons for $1$ seconds, in some order. If any two persons look at each other during the challenge, the challenge ends in failure. Find the order in which each person looks at each of the $N-1$ other persons, to be successful in the challenge. ## Constraints * $2 \leq N \leq 100$ ## Input The input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
7
Output #1
2 3 4 5 6 7
5 3 1 6 4 7
2 7 4 1 5 6
2 1 7 5 3 6
1 4 3 7 6 2
2 5 7 3 4 1
2 6 1 4 5 3
Input #2
2
Output #2
\-1
API Response (JSON)
{
  "problem": {
    "name": "3y3s Challenge",
    "description": {
      "content": "There are $N$ persons, conveniently numbered $1$ through $N$. They will take _3y3s Challenge_ for $N-1$ seconds. During the challenge, each person must look at each of the $N-1$ other persons for $1$ ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "relay_i"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "There are $N$ persons, conveniently numbered $1$ through $N$. They will take _3y3s Challenge_ for $N-1$ seconds.\nDuring the challenge, each person must look at each of the $N-1$ other persons for $1$ ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments