A Laser Tag environment is set up with several upright, rectangular, double-sided mirrors, all extending high overhead. These mirrors can reflect your laser beam, providing you with multiple ways to hit your opponents. However, they can also reflect your laser beam so that it accidentally hits yourself. Your task is to determine the angles that result in shooting yourself (so you can avoid them).
The mirrors are not perfectly reflective, so we only need to consider shots with at most reflections. Several possible setups are shown below. In the figures, the views are from above. The mirrors are depicted as black segments. All paths that lead back to the firing point are shown in gray. Take the firing point as the origin of a Cartesian coordinate system, with positive to the right and positive up the page. The coordinates of the origin and the ends of the mirrors are shown. For simplicity, assume that the mirrors have negligible thickness. Each path is labeled with the initial firing angle, measured in degrees counterclockwise from the positive -axis and rounded to the nearest degree, from to .
The input contains one or more data sets. Each data set starts with a line containing the number of mirrors , where 1 \le n \le 7. The next lines each contain the coordinates of the ends of a mirror, so for each mirror there is a sequence of numbers: x_1\ y_1\ x_2\ y_2. All coordinates are integers with absolute value less than . No mirrors intersect or touch. No mirror passes through the origin.
After the last data set there is a line containing only .
For each data set, output a single line. If there is one or more path back to the origin with at most reflections, output the starting angles, rounded to the nearest degree. All rounded angles must be normalized so 0 \le a \le 359. Remove any duplicates and print the integers in increasing order in a single line, separated by a space. If there is no such path back, output no danger. No path will strike the exact edge of a mirror. No output line will contain more than characters. Note that although you round the output to the nearest degree, your internal computations should use double-precision floating-point arithmetic.
The first two sample data sets correspond to the figures, and the third simply omits the bottom mirror from the second data set.
Example 1