{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003ePetya lives in a many-storied building where each flat occupies an entire story. Petya has studied local flora and fauna for many years. Having performed montly metering, he notices the following peculiarities:\r\n\u003cul\u003e\r\n\u003cli\u003e The number of cockroaches in each of the flats is an integer ranged from 0 to \u003ci\u003eN\u003c/i\u003e, where \u003ci\u003eN\u003c/i\u003e is a non-negative number not exceeding 30.\u003c/li\u003e\r\n\u003cli\u003e The number of cockroaches in a flat during a month is a function of three arguments: the number of cockroaches in this flat and the flats\r\nabove and below this one during the previous month.\u003c/li\u003e\r\n\u003c/ul\u003e\r\nPetya becomes interested in inducing the ways the insects\u0027 population size changes under these laws. To avoid the special cases of ground\r\nfloor and top floor, where the laws might be more complicated, Petya decided to solve this problem for an infinite-storied skyscraper. Let\u0027s consider that the number of cockroaches can decrease if they can be distributed among the flats (having no more than \u003ci\u003eN\u003c/i\u003e in any) in such a way that in the next month the total number of cockroaches in the building will decrease. Only a finite number of cockroaches can exist in the building; thus, all the flats, except a finite number of them, are free from these insects. Likewise, the number of cockroaches can increase if they can be distributed among the flats in such a way that in the next month the total number of cockroaches in the building will increase (and may possibly become infinite).\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 first line of the input contains the single number \u003ci\u003eN\u003c/i\u003e\u0026nbsp;— the maximum number of cockroaches in a flat. Following are samples of the function that defines the changes in the\r\nnumber of cockroaches in a flat. The samples are organized in a table having \u003ci\u003eN\u003c/i\u003e+1 block, where each block has \u003ci\u003eN\u003c/i\u003e+1 lines, and each line has \u003ci\u003eN\u003c/i\u003e+1 numbers ranged from 0 to \u003ci\u003eN\u003c/i\u003e. \u003ci\u003ek\u003c/i\u003e\u0027th number of \u003ci\u003ei\u003c/i\u003e\u0027th line of \u003ci\u003ej\u003c/i\u003e\u0027th block contains the number of cockroaches in the flat for the current month\r\nif in the previous month there were \u003ci\u003ej\u003c/i\u003e cockroaches in it, \u003ci\u003ei\u003c/i\u003e cockroaches\r\nin the flat below, and \u003ci\u003ek\u003c/i\u003e cockroaches in the flat above. The indices of blocks, lines, and numbers are zero-based. Petya has studied that if there were no cockroaches in some flat and in the flats below and above it in the previous month then there are no cockroaches in it in the current month.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe output must contain either:\r\n\u003cul\u003e\r\n\u003cli\u003e \u003d, if the number of cockroaches can neither increase or decrease, or \u003c/li\u003e\r\n\u003cli\u003e \u0026lt;, if the number of cockroaches can decrease, but not increase, or \u003c/li\u003e\r\n\u003cli\u003e \u0026gt;, if the number of cockroaches can increase, but not decrease, or \u003c/li\u003e\r\n\u003cli\u003e \u0026lt;\u0026gt;, if the number of cockroaches can both increase and decrease. \u003c/li\u003e\r\n\u003c/ul\u003e\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\n0 1\r\n0 1\r\n\r\n0 0\r\n1 1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003d\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\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\u003e2\r\n0 0 0\r\n0 0 0\r\n0 0 0\r\n\r\n1 1 1\r\n1 1 1\r\n1 1 1\r\n\r\n2 2 2\r\n2 2 2\r\n2 2 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u0026lt;\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}