{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOnce \u003ci\u003eN\u003c/i\u003e white and \u003ci\u003eN\u003c/i\u003e black frogs decided to play a game.\r\nThey found 2\u003ci\u003eN\u003c/i\u003e+1 tussocks and numbered them from 0 to 2\u003ci\u003eN\u003c/i\u003e.\r\nThen the frogs occupied the tussocks in such a way that \r\nthe white frogs sit on the tussocks with numbers 0 .. \u003ci\u003eN\u003c/i\u003e–1,\r\nthe black frogs sit on the tussocks with numbers \u003ci\u003eN\u003c/i\u003e+1 .. 2\u003ci\u003eN\u003c/i\u003e,\r\nand the tussock \u003ci\u003eN\u003c/i\u003e is empty. The goal is to swap the white \r\nand black frogs, i.e., in the end of the game the first \u003ci\u003eN\u003c/i\u003e \r\ntussocks must be occupied by the black frogs, and the last \u003ci\u003eN\u003c/i\u003e \r\ntussocks must be occupied by the white frogs. In this game, the following \r\nmoves are allowed. Frogs may jump only to empty tussocks.\r\nA black frog may jump from a tussock numbered \u003ci\u003ei\u003c/i\u003e \u0026gt; 0 \r\nto the tussock \u003ci\u003ei\u003c/i\u003e–1, or it may jump from a tussock \u003ci\u003ej\u003c/i\u003e \u0026gt; 1 \r\nto the tussock \u003ci\u003ej\u003c/i\u003e–2 if there is a white frog on the tussock \u003ci\u003ej\u003c/i\u003e–1.\r\nSimilarly, a white frog may jump from a tussock \u003ci\u003ei\u003c/i\u003e \u0026lt; 2\u003ci\u003eN\u003c/i\u003e \r\nto the tussock \u003ci\u003ei\u003c/i\u003e+1, or it may jump from a tussock \u003ci\u003ej\u003c/i\u003e \u0026lt; 2\u003ci\u003eN\u003c/i\u003e-1 \r\nto the tussock \u003ci\u003ej\u003c/i\u003e+2 if there is a black frog on the tussock \u003ci\u003ej\u003c/i\u003e+1. \r\nUsually in games white and black make moves by turns, but here white and black \r\nfrogs have the same goal, so they may make moves in any order, and the total number \r\nof moves of white frogs may differ from the total number of moves of black \r\nfrogs. If after one million moves the frogs still have not swapped, \r\nthey become bored of the game and jump into the water.\r\n\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eGiven \u003ci\u003eN\u003c/i\u003e, determine if the frogs can achieve their goal.\r\n\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe input is a single integer \u003ci\u003eN\u003c/i\u003e in the range from 1 to 499.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIf the frogs cannot swap, then output the number –1. \r\nOtherwise, in the first line output the number of moves\r\n\u003ci\u003eK\u003c/i\u003e needed for the fulfillment of the task, and in the second \r\nline output the sequence of numbers \u003ci\u003eС\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e \r\nseparated by a space (1 ≤ \u003ci\u003ei\u003c/i\u003e ≤ \u003ci\u003eK\u003c/i\u003e),\r\nwhere \u003ci\u003eС\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e is the number of the tussock \r\nfrom which a jump is performed at the \u003ci\u003ei\u003c/i\u003eth move.\r\nIf there are many solutions, you may output any of them.\r\n\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n2 0 1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}