{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Consider a 3D scene with OXYZ coordinate system. Axis OX points to the right, axis OY points up, and axis OZ points away from you. There is a number of rectangular windows on the scene. The plane of each window is parallel to OXY , its sides are parallel to OX and OY . All windows are situated at different depths on the scene (different coordinates z \u0026gt; 0).\r\u003cbr\u003e\u003ccenter\u003e\u003cimg src\u003d\"CDN_BASE_URL/a3859c9c21e031ef97744c46ea6852f5?v\u003d1714259040\"\u003e\u003c/center\u003e\r\u003cbr\u003eA gunman with a rifle moves along OX axis (y \u003d 0 and z \u003d 0). He can shoot a bullet in a straight line. His goal is to shoot a single bullet through all the windows. Just touching a window edge is enough.\r\u003cbr\u003eYour task is to determine how to make such shot."}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input file contains a single integer number n (2 \u0026lt;\u003d n \u0026lt;\u003d 100) — the number of windows on the scene. The following n lines describe the windows. Each line contains five integer numbers x\u003csub\u003e1i\u003c/sub\u003e, y\u003csub\u003e1i\u003c/sub\u003e, x\u003csub\u003e2i\u003c/sub\u003e, y\u003csub\u003e2i\u003c/sub\u003e, z\u003csub\u003ei\u003c/sub\u003e (0 \u0026lt; x\u003csub\u003e1i\u003c/sub\u003e, y\u003csub\u003e1i\u003c/sub\u003e, x\u003csub\u003e2i\u003c/sub\u003e, y\u003csub\u003e2i\u003c/sub\u003e, z\u003csub\u003ei\u003c/sub\u003e \u0026lt; 1000). Here (x\u003csub\u003e1i\u003c/sub\u003e, y\u003csub\u003e1i\u003c/sub\u003e, z\u003csub\u003ei\u003c/sub\u003e) are coordinates of the bottom left corner of the window, and (x\u003csub\u003e2i\u003c/sub\u003e, y\u003csub\u003e2i\u003c/sub\u003e, z\u003csub\u003ei\u003c/sub\u003e) are coordinates of the top right corner of the window (x\u003csub\u003e1i\u003c/sub\u003e \u0026lt; x\u003csub\u003e2i\u003c/sub\u003e, y\u003csub\u003e1i\u003c/sub\u003e \u0026lt; y\u003csub\u003e2i\u003c/sub\u003e). Windows are ordered by z coordinate (z\u003csub\u003ei\u003c/sub\u003e \u0026gt; z\u003csub\u003ei-1\u003c/sub\u003e for 2 \u0026lt;\u003d i \u0026lt;\u003d n)."}},{"title":"Output","value":{"format":"HTML","content":"Output a single word \"UNSOLVABLE\" if the gunman cannot reach the goal of shooting a bullet through all the windows.\r\u003cbr\u003eOtherwise, on the first line output a word \"SOLUTION\". On the next line output x coordinate of the point from which the gunman must fire a bullet. On the following n lines output x, y, z coordinates of the points where the bullet goes through the consecutive windows. All coordinates in the output file must be printed with six digits after decimal point."}},{"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\u003e3\r\n1 3 5 5 3\r\n1 2 5 7 5\r\n5 2 7 6 6\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eSOLUTION\r\n-1.000000\r\n2.000000 3.000000 3.000000\r\n4.000000 5.000000 5.000000\r\n5.000000 6.000000 6.000000\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}