{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e h1,h2,h3,h4,h5,h6 { margin-bottom:0; } div.textBG p { margin: 0 0 0.0001pt; }\u003c/style\u003e\nA ring is composed of \u003ci\u003en\u003c/i\u003e (even number) circles. Put natural numbers1, 2, ..., \u003ci\u003en\u003c/i\u003e into each circle separately, and the sum of numbers in two adjacent circles should be a prime. \u003cb\u003eNote:\u003c/b\u003e The number of first circle should always be 1."}},{"title":"Input","value":{"format":"HTML","content":"\u003ci\u003en\u003c/i\u003e (0 \u003c \u003ci\u003en\u003c/i\u003e ≤ 16)"}},{"title":"Output","value":{"format":"HTML","content":"The output format is shown as sample below. Each row represents a series of circle numbers in the ring beginning from 1 clockwisely and anticlockwisely. The order of numbers must satisfy the above requirements.\n\u003cbr\u003e\nYou are to write a program that completes above process."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\n6\n8\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\nCase 1:\n1 4 3 2 5 6\n1 6 5 2 3 4\n\nCase 2:\n1 2 3 8 5 6 7 4\n1 2 5 8 3 4 7 6\n1 4 7 6 5 8 3 2\n1 6 7 4 3 8 5 2\n\u003c/pre\u003e"}}]}