{"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 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!\nSnuke 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:\n\n*   You must be able to jump from any page to any other page by clicking at most $10$ links.\n\nUnder the constraints of the problem, we can prove that this is always possible.\n\n## Constraints\n\n*   $1 \\leq N \\leq 1000$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc050_a","tags":[],"sample_group":[["1","1 1\n\nSnuke made an excellent website with only one page. It even contains two links to itself!"],["3","2 3\n1 3\n1 2\n\nHere we can jump from any page to any other page by a direct link."]],"created_at":"2026-03-03 11:01:14"}}