{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e\r\nh1,h2,h3,h4,h5,h6{margin-bottom:0;}div.textBG p{margin: 0 0 0.0001pt;}\u003c/style\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cdiv class\u003d\"Section1\"\u003e\r\n\t\u003cp class\u003d\"MsoNormal\" style\u003d\"text-align:justify\"\u003e\r\n\t\tJohn has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed.\u003c/p\u003e\r\n\t\u003cp style\u003d\"text-align:justify\"\u003e\r\n\t\t\u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003e\u003cspan style\u003d\"font-size:18.0pt\"\u003eInput \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/b\u003e\u003c/p\u003e\r\n\t\u003cp style\u003d\"text-align:justify\"\u003e\r\n\t\tThe input will consist of several instances of the problem. Each instance begins with a line containing two integers, \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003e1 \u0026lt;\u003d n \u0026lt;\u003d 100\u003c/b\u003e and \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003em\u003c/b\u003e. \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003en\u003c/b\u003e is the number of tasks (numbered from \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003e1\u003c/b\u003e to \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003en\u003c/b\u003e) and \u003cb style\u003d\"mso-bidi-font-weight:\r\nnormal\"\u003em\u003c/b\u003e is the number of direct precedence relations between tasks. After this, there will be \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003em\u003c/b\u003e lines with two integers \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003ei\u003c/b\u003e and \u003cb style\u003d\"mso-bidi-font-weight:\r\nnormal\"\u003ej\u003c/b\u003e, representing the fact that task \u003cb style\u003d\"mso-bidi-font-weight:\r\nnormal\"\u003ei\u003c/b\u003e must be executed before task \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003ej\u003c/b\u003e. An instance with \u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003en \u003d m \u003d 0\u003c/b\u003e will finish the input.\u003c/p\u003e\r\n\t\u003cp style\u003d\"text-align:justify\"\u003e\r\n\t\t\u003cb style\u003d\"mso-bidi-font-weight:normal\"\u003e\u003cspan style\u003d\"font-size:18.0pt\"\u003eOutput \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/b\u003e\u003c/p\u003e\r\n\t\u003ch3\u003e\r\n\t\t\u003cspan style\u003d\"font-weight:normal;mso-bidi-font-weight:bold\"\u003eFor each instance, print a line with \u003c/span\u003en\u003cspan style\u003d\"font-weight:normal;mso-bidi-font-weight:\r\nbold\"\u003e integers representing the tasks in a possible order of execution. \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/h3\u003e\r\n\t\u003ch3\u003e\r\n\t\t\u003cspan style\u003d\"font-size:18.0pt\"\u003eSample Input \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/h3\u003e\r\n\t\u003cpre\u003e\r\n\t5 4\u003c/pre\u003e\r\n\t\u003cpre\u003e\r\n\t1 2\u003c/pre\u003e\r\n\t\u003cpre\u003e\r\n\t2 3\u003c/pre\u003e\r\n\t\u003cpre\u003e\r\n\t1 3\u003c/pre\u003e\r\n\t\u003cpre\u003e\r\n\t1 5\u003c/pre\u003e\r\n\t\u003cpre\u003e\r\n\t0 0\u003c/pre\u003e\r\n\t\u003ch3 style\u003d\"tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt\"\u003e\r\n\t\t\u003cspan style\u003d\"font-size:18.0pt\"\u003eSample Output \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/h3\u003e\r\n\t\u003cpre\u003e\r\n\t1 4 2 5 3\u003c/pre\u003e\r\n\t\u003cdiv align\u003d\"center\" class\u003d\"MsoNormal\" style\u003d\"text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt\"\u003e\r\n\t\t\u0026nbsp;\u003c/div\u003e\r\n\t\u003cp class\u003d\"MsoNormal\" style\u003d\"tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt\"\u003e\r\n\t\t\u0026nbsp;\u003c/p\u003e\r\n\u003c/div\u003e\r\n\u003cstyle type\u003d\"text/css\"\u003e\r\n\u003c!--{cke_protected}{C}%3C!%2D%2D%0A%20%2F*%20Style%20Definitions%20*%2F%0A%20p.MsoNormal%2C%20li.MsoNormal%2C%20div.MsoNormal%0A%09%7Bmso-style-parent%3A%22%22%3B%0A%09margin%3A0in%3B%0A%09margin-bottom%3A.0001pt%3B%0A%09mso-pagination%3Awidow-orphan%3B%0A%09font-size%3A12.0pt%3B%0A%09font-family%3A%22Times%20New%20Roman%22%3B%0A%09mso-fareast-font-family%3A%22Times%20New%20Roman%22%3B%7D%0Ah2%0A%09%7Bmso-margin-top-alt%3Aauto%3B%0A%09margin-right%3A0in%3B%0A%09mso-margin-bottom-alt%3Aauto%3B%0A%09margin-left%3A0in%3B%0A%09mso-pagination%3Awidow-orphan%3B%0A%09mso-outline-level%3A2%3B%0A%09font-size%3A18.0pt%3B%0A%09font-family%3A%22Times%20New%20Roman%22%3B%0A%09font-weight%3Abold%3B%7D%0Ah3%0A%09%7Bmso-margin-top-alt%3Aauto%3B%0A%09margin-right%3A0in%3B%0A%09mso-margin-bottom-alt%3Aauto%3B%0A%09margin-left%3A0in%3B%0A%09mso-pagination%3Awidow-orphan%3B%0A%09mso-outline-level%3A3%3B%0A%09font-size%3A13.5pt%3B%0A%09font-family%3A%22Times%20New%20Roman%22%3B%0A%09font-weight%3Abold%3B%7D%0Ap%0A%09%7Bmso-margin-top-alt%3Aauto%3B%0A%09margin-right%3A0in%3B%0A%09mso-margin-bottom-alt%3Aauto%3B%0A%09margin-left%3A0in%3B%0A%09mso-pagination%3Awidow-orphan%3B%0A%09font-size%3A12.0pt%3B%0A%09font-family%3A%22Times%20New%20Roman%22%3B%0A%09mso-fareast-font-family%3A%22Times%20New%20Roman%22%3B%7D%0Apre%0A%09%7Bmargin%3A0in%3B%0A%09margin-bottom%3A.0001pt%3B%0A%09mso-pagination%3Awidow-orphan%3B%0A%09tab-stops%3A45.8pt%2091.6pt%20137.4pt%20183.2pt%20229.0pt%20274.8pt%20320.6pt%20366.4pt%20412.2pt%20458.0pt%20503.8pt%20549.6pt%20595.4pt%20641.2pt%20687.0pt%20732.8pt%3B%0A%09font-size%3A10.0pt%3B%0A%09font-family%3A%22Courier%20New%22%3B%0A%09mso-fareast-font-family%3A%22Times%20New%20Roman%22%3B%7D%0A%40page%20Section1%0A%09%7Bsize%3A8.5in%2011.0in%3B%0A%09margin%3A1.0in%201.0in%201.0in%201.0in%3B%0A%09mso-header-margin%3A.5in%3B%0A%09mso-footer-margin%3A.5in%3B%0A%09mso-paper-source%3A0%3B%7D%0Adiv.Section1%0A%09%7Bpage%3ASection1%3B%7D%0A%2D%2D%3E--\u003e\u003c/style\u003e"}}]}