Color Ropes are suspended in space, which is defined by a certain coordinate system, as show in figure 1. There are only two color ropes in this puzzle, red and blue. Each rope is a close curve, which consists of some segments with the same color connected one by one. In this problem, we define two relations between two ropes, separable and inseparable. Rope A is separable from rope B if and only if the shortest distance between rope A and rope B can be changed infinitely by moving, crooking or extending any rope without broken, otherwise they are inseparable. You will understand the relation more clearly after seeing following figure 1 and figure 2. In fact, in order to prevent the ropes from broken, you are not allowed to extended any rope infinitely. Figure 1 Two ropes are separable Figure 2 Two ropes are inseparable To simplify the problem, we define a special function on the rope, that is a segment can go through any other segment with the same color without broken, as shown in figure 3. You should write a program to check the relation between two given ropes with different colors. Figure 3 The special function of segments with the same color Input The input file contains multiple test cases. There are two lines in each case and each line defines a color rope. In each line of a case, there are several integers. The first integer, N, indicates the number of segments of the rope. The next N integer groups indicate the coordinates of all vertexes of the rope in clockwise order. Each group has three integers, Xi, Yi, Zi, indicating the X value, Y value, and Z value of the coordinate of the vertex. The two ropes in each case have different colors, you could suppose one is red and the other is blue. The input file ends with two lines, each which only contains a zero.
2/2 Assumptions: