{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eDislike of philosophy brings people together, the need to take the exam especially. But the main thing is a clear sense of reluctance to prepare for it.\u003c/p\u003e\n\n\u003cp\u003e--- \u003cem\u003eSee, Ira, you come to the teacher and propose him such a thing: we have \u003c/em\u003e\u003cstrong\u003e18\u003c/strong\u003e\u003cem\u003e tickets, they lie face down. Let us turn over \u003c/em\u003e\u003cstrong\u003eK\u003c/strong\u003e\u003cem\u003e of them, then you have them all properly shu\u001fed and put in one pile. After that I, I mean you, close your eyes and have to divide them into two piles so that they will have the same number of tickets with their faces up. Then you are allowed to swap any two tickets in the \u001cfirst pile, turn over one ticket in the \u001cfirst pile, and permanently move the tickets from the fi\u001crst pile to the second. You\u0027re doing it with your eyes closed and don\u0027t have any information about the status of tickets other than that you know the number \u003c/em\u003e\u003cstrong\u003eK\u003c/strong\u003e\u003cem\u003e and remember all your actions.\u003c/em\u003e --- \u003cem\u003eOkay, so what?\u003c/em\u003e --- \u003cem\u003eSo, if you will succeed, the teacher gives you the opportunity to answer any of the open tickets. \u003c/em\u003e --- \u003cem\u003eAnd if not? \u003c/em\u003e --- \u003cem\u003eWe\u0027ll have to believe in a miracle. \u003c/em\u003e --- \u003cem\u003eWhy don\u0027t you try it yourself? \u003c/em\u003e --- \u003cem\u003eNot that I have a good reputation. \u003c/em\u003e --- \u003cem\u003eSo you want to spoil mine? \u003c/em\u003e --- \u003cem\u003eOh, three times.\u003c/em\u003e\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eInput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eGiven only an even integer \u003cstrong\u003eK\u003c/strong\u003e (\u003cstrong\u003e0\u003c/strong\u003e ≤ \u003cstrong\u003eK\u003c/strong\u003e ≤ \u003cstrong\u003e18\u003c/strong\u003e) --- the number of cards fl\u001dipped face-up (initially all \u003cstrong\u003e18\u003c/strong\u003e tickets are in the \u001cfirst pile).\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eOutput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eIf you can not separate tickets into two non-empty piles as needed, your output should be \u003cstrong\u003e-1\u003c/strong\u003e. Otherwise, the \u001cfirst line should contain the number of actions \u003cstrong\u003eQ\u003c/strong\u003e to make (\u003cstrong\u003e0\u003c/strong\u003e ≤ \u003cstrong\u003eQ\u003c/strong\u003e ≤ \u003cstrong\u003e2^9+36\u003c/strong\u003e). Further, in \u003cstrong\u003eQ\u003c/strong\u003e rows, describe the procedure. Each line should contain the command of one of three types:\u003c/p\u003e\n\n\u003cul\u003e\n\u003cp\u003e\u003cli\u003e \u003cstrong\u003eswap i j\u003c/strong\u003e --- swap tickets at positions \u003cstrong\u003ei\u003c/strong\u003e and \u003cstrong\u003ej\u003c/strong\u003e first pile.\u003c/p\u003e\n\n\u003cp\u003e\u003cli\u003e \u003cstrong\u003erev i\u003c/strong\u003e --- turn over the ticket in position \u003cstrong\u003ei\u003c/strong\u003e in first pile.\u003c/p\u003e\n\n\u003cp\u003e\u003cli\u003e \u003cstrong\u003eout i\u003c/strong\u003e --- Move a ticket in position \u003cstrong\u003ei\u003c/strong\u003e from the \u001cfirst pile to the second. After this operation, positions all tickets in the \u001crst pile, starting from the \u003cstrong\u003e(i+1)\u003c/strong\u003e-th, will decrease by 1.\u003c/p\u003e\n\n\u003c/ul\u003e\n\n\u003cp\u003ePiles should be non-empty and contain the same number of open tickets, \u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003ei\u003c/strong\u003e ≠ \u003cstrong\u003ej\u003c/strong\u003e ≤ \u003cstrong\u003e18\u003c/strong\u003e, and both \u003cstrong\u003ei\u003c/strong\u003e and \u003cstrong\u003ej\u003c/strong\u003e should be less than current size of fi\u001crst pile.\u003c/p\u003e\n\n"}},{"title":"Example","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\u003e18\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e9\nout 1\nout 1\nout 1\nout 1\nout 1\nout 1\nout 1\nout 1\nout 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}