AtCoder Jumper

AtCoder
IDagc050_a
Time2000ms
Memory256MB
Difficulty
Have you noticed this part of AtCoder website? ![image](https://img.atcoder.jp/agc050/2a140890f3297cce737744ff4d2f296d.png) Here the numbers are carefully chosen so that we can jump from any page to any page in small number of steps, while each page doesn't contain too many links. In this task you are asked to do a similar thing with only **two links** on each page! Snuke made a website with $N$ pages numbered $1$ through $N$. For each $i$ ($1 \leq i \leq N$), choose two integers $a_i$ and $b_i$ ($1 \leq a_i, b_i \leq N$), and add two links on Page $i$: a link to Page $a_i$ and a link to Page $b_i$. The website must satisfy the following constraint: * You must be able to jump from any page to any other page by clicking at most $10$ links. Under the constraints of the problem, we can prove that this is always possible. ## Constraints * $1 \leq N \leq 1000$ ## Input Input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
1
Output #1
1 1

Snuke made an excellent website with only one page. It even contains two links to itself!
Input #2
3
Output #2
2 3
1 3
1 2

Here we can jump from any page to any other page by a direct link.
API Response (JSON)
{
  "problem": {
    "name": "AtCoder Jumper",
    "description": {
      "content": "Have you noticed this part of AtCoder website? ![image](https://img.atcoder.jp/agc050/2a140890f3297cce737744ff4d2f296d.png) Here the numbers are carefully chosen so that we can jump from any page to a",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "agc050_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Have you noticed this part of AtCoder website?\n![image](https://img.atcoder.jp/agc050/2a140890f3297cce737744ff4d2f296d.png)\nHere the numbers are carefully chosen so that we can jump from any page to a...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments