Problem: You are given a piece of paper in the shape of a simple polygon S. Your task is to turn it into a simple polygon T that has the same area as S.

You can use two tools: scissors and tape. Scissors can be used to cut any polygon into smaller polygonal pieces. Tape can be used to combine smaller pieces into larger polygons. You can use each tool multiple times, in any order. 

The polygons given in the input have integer coordinates, but you are allowed to produce shapes with non-integer coordinates in your output.

A formal definition of the task follows.

A shape Q=(Q_0,...,Q_{n-1}) is a sequence of three or more points in the plane such that: 

  * The closed polyline Q_0Q_1Q_2... Q_{n-1}Q_0 never touches or intersects itself, and therefore it forms the boundary of a simple polygon. 
  * The polyline goes around the boundary of the polygon in the counter-clockwise direction. 



The polygon whose boundary is the shape Q will be denoted P(Q).

Two shapes are called equivalent if one can be translated and/or rotated to become identical with the other.

Note that mirroring a shape is not allowed. Also note that the order of points matters: the shape (Q_1,...,Q_{n-1},Q_0) is not necessarily equivalent to the shape (Q_0,...,Q_{n-1}).

<image>

In the figure on the left: Shapes U and V are equivalent. Shape W is not equivalent with them because the points of W are given in a different order. Regardless of the order of points, the fourth shape is not equivalent with the previous ones either as flipping a shape is not allowed.

In both input and output, a shape with n points is represented as a single line that contains 2n+1 space-separated numbers: the number n followed by the coordinates of the points: Q_{0,x}, Q_{0,y}, Q_{1,x}, ...

Shapes have identification numbers (IDs). The given shape S has ID 0, the shapes you produce in your solutions are given IDs 1, 2, 3, ..., in the order in which they are produced.

Shapes B_1,...,B_k form a subdivision of shape A if: 

  * The union of all P(B_i) is exactly P(A). 
  * For each i≠ j, the area of the intersection of P(B_i) and P(B_j) is zero. 



The scissors operation destroys one existing shape A and produces one or more shapes B_1,...,B_k that form a subdivision of A.

<image>

In the figure: Shape A (square) subdivided into shapes B_1, B_2, B_3 (the three triangles). One valid way to describe one of the B_i is "3 3 1 6 1 5.1 4".

The tape operation destroys one or more existing shapes A_1,...,A_k and produces one new shape B. In order to perform this operation, you must first specify shapes C_1,...,C_k and only then the final shape B. These shapes must satisfy the following: 

  * For each i, the shape C_i is equivalent to the shape A_i. 
  * The shapes C_1,...,C_k form a subdivision of the shape B. 



Informally, you choose the shape B and show how to move each of the existing A_i to its correct location C_i within B. Note that only the shape B gets a new ID, the shapes C_i do not.

Input

The first line contains the source shape S.

The second line contains the target shape T.

Each shape has between 3 and 10 points, inclusive. Both shapes are given in the format specified above.

All coordinates in the input are integers between -10^6 and 10^6, inclusive.

In each shape, no three points form an angle smaller than 3 degrees. (This includes non-consecutive points and implies that no three points are collinear.)

The polygons P(S) and P(T) have the same area.

Output

Whenever you use the scissors operation, output a block of lines of the form: 
    
    
      
    scissors  
    id(A) k  
    B_1  
    B_2  
    ...  
    B_k  
    

where id(A) is the ID of the shape you want to destroy, k is the number of new shapes you want to produce, and B_1,...,B_k are those shapes.

Whenever you use the tape operation, output a block of lines of the form: 
    
    
      
    tape  
    k id(A_1) ... id(A_k)  
    C_1  
    C_2  
    ...  
    C_k  
    B  
    

where k is the number of shapes you want to tape together, id(A_1),...,id(A_k) are their IDs, C_1,...,C_k are equivalent shapes showing their position within B, and B is the final shape obtained by taping them together.

It is recommended to output coordinates of points to at least 10 decimal places.

The output must satisfy the following: 

  * All coordinates of points in the output must be between -10^7 and 10^7, inclusive. 
  * Each shape in the output must have at most 100 points. 
  * In each operation the number k of shapes must be between 1 and 100, inclusive. 
  * The number of operations must not exceed 2000. 
  * The total number of points in all shapes in the output must not exceed 20000. 
  * In the end, there must be exactly one shape (that hasn't been destroyed), and that shape must be equivalent to T. 
  * All operations must be valid according to the checker. Solutions with small rounding errors will be accepted. (Internally, all comparisons check for absolute or relative error up to 10^{-3} when verifying each condition.) 

Scoring

A shape is called a nice rectangle if it has the form ((0,0),~ (x,0),~ (x,y),~ (0,y)) for some positive integers x and y.

A shape is called a nice square if additionally x=y.

A shape A is called strictly convex if all inner angles of the polygon P(A) are smaller than 180 degrees.

Subtask 1 (5 points): S and T are nice rectangles. All coordinates of all points are integers between 0 and 10, inclusive

Subtask 2 (13 points): S is a nice rectangle with x>y, and T is a nice square

Subtask 3 (12 points): S and T are nice rectangles

Subtask 4 (14 points): S is a triangle and T is a nice square

Subtask 5 (10 points): S and T are triangles

Subtask 6 (16 points): S is a strictly convex polygon and T is a nice rectangle

Subtask 7 (11 points): T is a nice rectangle

Subtask 8 (19 points): no additional constraints

Examples

Input


6 0 0 6 0 6 4 5 4 5 9 0 9
4 0 0 7 0 7 7 0 7


Output


scissors
0 5
3 0 0 3 0 3 4
3 3 4 0 4 0 0
3 3 0 6 0 6 4
3 6 4 3 4 3 0
4 0 4 5 4 5 9 0 9
tape
5 1 2 5 3 4
3 0 3 0 0 4 0
3 4 0 7 0 7 4
4 0 3 4 0 7 4 3 7
3 7 4 7 7 3 7
3 3 7 0 7 0 3
4 0 0 7 0 7 7 0 7

Input


4 0 0 3 0 3 3 0 3
4 7 -1 10 -1 11 2 8 2


Output


scissors
0 2
3 0 0 1 3 0 3
4 1 3 0 0 3 0 3 3
tape
2 1 2
3 110 -1 111 2 110 2
4 108 2 107 -1 110 -1 110 2
4 107 -1 110 -1 111 2 108 2


Input


4 0 0 9 0 9 1 0 1
4 0 0 3 0 3 3 0 3


Output


scissors
0 2
4 1.470000000 0 9 0 9 1 1.470000000 1
4 0 0 1.470000000 0 1.470000000 1 0 1
scissors
1 2
4 1.470000000 0 6 0 6 1 1.470000000 1
4 9 0 9 1 6 1 6 0
tape
2 4 3
4 3 2 3 1 6 1 6 2
4 6 1 1.470000000 1 1.470000000 0 6 0
6 1.470000000 0 6 0 6 2 3 2 3 1 1.470000000 1
scissors
5 4
4 1.470000000 0 3 0 3 1 1.470000000 1
4 3 0 4 0 4 2 3 2
4 4 2 4 0 5 0 5 2
4 5 0 6 0 6 2 5 2
tape
5 2 6 7 8 9
4 0 0 1.470000000 0 1.470000000 1 0 1
4 1.470000000 0 3 0 3 1 1.470000000 1
4 0 2 0 1 2 1 2 2
4 0 2 2 2 2 3 0 3
4 3 3 2 3 2 1 3 1
4 0 0 3 0 3 3 0 3

Note

The figure below shows the first example output. On the left is the original figure after using the scissors, on the right are the corresponding C_i when we tape those pieces back together.

<image>

In the second example output, note that it is sufficient if the final shape is equivalent to the target one, they do not have to be identical.

The figure below shows three stages of the third example output. First, we cut the input rectangle into two smaller rectangles, then we cut the bigger of those two rectangles into two more. State after these cuts is shown in the top left part of the figure.

Continuing, we tape the two new rectangles together to form a six-sided polygon, and then we cut that polygon into three 2-by-1 rectangles and one smaller rectangle. This is shown in the bottom left part of the figure.

Finally, we take the rectangle we still have from the first step and the four new rectangles and we assemble them into the desired 3-by-3 square.

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
double dot2(double x1, double y1, double x2, double y2) {
  return x1 * x2 + y1 * y2;
}
double cross2(double x1, double y1, double x2, double y2) {
  return x1 * y2 - x2 * y1;
}
double dot(double x0, double y0, double x1, double y1, double x2, double y2) {
  return dot2(x1 - x0, y1 - y0, x2 - x0, y2 - y0);
}
int *xx, *yy;
double cross(int i, int j, int k) {
  return cross2(xx[j] - xx[i], yy[j] - yy[i], xx[k] - xx[i], yy[k] - yy[i]);
}
int m;
int rect2rect(double x1, double y1, double x2, double y2, int h) {
  if (x1 == x2) return h;
  if (x1 * 2 <= x2) {
    printf("scissors\n");
    printf("%d 2\n", h);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x1, 0, x1, y1 / 2, 0, y1 / 2);
    printf("4 %d %f %f %f %f %f %d %f\n", 0, y1 / 2, x1, y1 / 2, x1, y1, 0, y1);
    printf("tape\n");
    printf("2 %d %d\n", m + 1, m + 2);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x1, 0, x1, y1 / 2, 0, y1 / 2);
    printf("4 %f %d %f %d %f %f %f %f\n", x1, 0, x1 * 2, 0, x1 * 2, y1 / 2, x1,
           y1 / 2);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x1 * 2, 0, x1 * 2, y1 / 2, 0,
           y1 / 2);
    return rect2rect(x1 * 2, y1 / 2, x2, y2, m += 3);
  } else if (x1 / 2 >= x2) {
    printf("scissors\n");
    printf("%d 2\n", h);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x1 / 2, 0, x1 / 2, y1, 0, y1);
    printf("4 %f %d %f %d %f %f %f %f\n", x1 / 2, 0, x1, 0, x1, y1, x1 / 2, y1);
    printf("tape\n");
    printf("2 %d %d\n", m + 1, m + 2);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x1 / 2, 0, x1 / 2, y1, 0, y1);
    printf("4 %d %f %f %f %f %f %d %f\n", 0, y1, x1 / 2, y1, x1 / 2, y1 * 2, 0,
           y1 * 2);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x1 / 2, 0, x1 / 2, y1 * 2, 0,
           y1 * 2);
    return rect2rect(x1 / 2, y1 * 2, x2, y2, m += 3);
  } else if (x1 > x2) {
    printf("scissors\n");
    printf("%d 3\n", h);
    printf("5 %d %d %f %d %f %f %f %f %d %f\n", 0, 0, x2, 0, x2, y2 - y1,
           x1 - x2, y1, 0, y1);
    printf("3 %f %d %f %d %f %f\n", x2, 0, x1, 0, x2, y2 - y1);
    printf("3 %f %d %f %f %f %f\n", x1, 0, x1, y1, x1 - x2, y1);
    printf("tape\n");
    printf("3 %d %d %d\n", m + 1, m + 2, m + 3);
    printf("5 %d %d %f %d %f %f %f %f %d %f\n", 0, 0, x2, 0, x2, y2 - y1,
           x1 - x2, y1, 0, y1);
    printf("3 %d %f %f %f %d %f\n", 0, y1, x1 - x2, y1, 0, y2);
    printf("3 %f %f %f %f %d %f\n", x2, y2 - y1, x2, y2, 0, y2);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x2, 0, x2, y2, 0, y2);
    return m += 4;
  } else {
    printf("scissors\n");
    printf("%d 3\n", h);
    printf("5 %d %d %f %d %f %f %f %f %d %f\n", 0, 0, x1, 0, x1, y1 - y2,
           x2 - x1, y2, 0, y2);
    printf("3 %d %f %f %f %d %f\n", 0, y2, x2 - x1, y2, 0, y1);
    printf("3 %f %f %f %f %d %f\n", x1, y1 - y2, x1, y1, 0, y1);
    printf("tape\n");
    printf("3 %d %d %d\n", m + 1, m + 2, m + 3);
    printf("5 %d %d %f %d %f %f %f %f %d %f\n", 0, 0, x1, 0, x1, y1 - y2,
           x2 - x1, y2, 0, y2);
    printf("3 %f %d %f %d %f %f\n", x1, 0, x2, 0, x1, y1 - y2);
    printf("3 %f %d %f %f %f %f\n", x2, 0, x2, y2, x2 - x1, y2);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, x2, 0, x2, y2, 0, y2);
    return m += 4;
  }
}
int tri2rect(double x0, double y0, double x1, double y1, double x2, double y2,
             double x3, double y3, double x4, double y4, int h) {
  double a, b, c;
  if (dot(x0, y0, x1, y1, x2, y2) < 0) {
    printf("tape\n");
    printf("1 %d\n", h);
    printf("3 %f %f %f %f %f %f\n", x0, y0, x1, y1, x2, y2);
    printf("3 %f %f %f %f %f %f\n", x1, y1, x2, y2, x0, y0);
    return tri2rect(x1, y1, x2, y2, x0, y0, x3, y3, x4, y4, ++m);
  }
  if (dot(x1, y1, x0, y0, x2, y2) < 0) {
    printf("tape\n");
    printf("1 %d\n", h);
    printf("3 %f %f %f %f %f %f\n", x0, y0, x1, y1, x2, y2);
    printf("3 %f %f %f %f %f %f\n", x2, y2, x0, y0, x1, y1);
    return tri2rect(x2, y2, x0, y0, x1, y1, x3, y3, x4, y4, ++m);
  }
  if (x0 != 0 || y0 != 0 || x1 <= x0 || y1 != y0) {
    double d = hypot(x1 - x0, y1 - y0), x1_ = (x1 - x0) / d,
           y1_ = (y1 - y0) / d;
    double x2_ = (x2 - x0) * x1_ + (y2 - y0) * y1_,
           y2_ = (y2 - y0) * x1_ - (x2 - x0) * y1_;
    printf("tape\n");
    printf("1 %d\n", h);
    printf("3 %d %d %f %d %f %f\n", 0, 0, d, 0, x2_, y2_);
    printf("3 %d %d %f %d %f %f\n", 0, 0, d, 0, x2_, y2_);
    return tri2rect(0, 0, d, 0, x2_, y2_, x3, y3, x4, y4, ++m);
  }
  printf("scissors\n");
  printf("%d 2\n", h);
  printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, x1, 0, (x2 + x1) / 2, y2 / 2,
         x2 / 2, y2 / 2);
  printf("3 %f %f %f %f %f %f\n", x2 / 2, y2 / 2, (x2 + x1) / 2, y2 / 2, x2,
         y2);
  printf("tape\n");
  printf("2 %d %d\n", m + 1, m + 2);
  printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, x1, 0, (x2 + x1) / 2, y2 / 2,
         x2 / 2, y2 / 2);
  printf("3 %f %f %f %f %f %d\n", x2 / 2 + x1, y2 / 2, (x2 + x1) / 2, y2 / 2,
         x1, 0);
  printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, x1, 0, x2 / 2 + x1, y2 / 2,
         x2 / 2, y2 / 2);
  h = m += 3;
  a = x1, b = x2 / 2, c = y2 / 2;
  if (b != 0) {
    printf("scissors\n");
    printf("%d 2\n", h);
    printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, a, 0, a, c, b, c);
    printf("3 %f %d %f %f %f %f\n", a, 0, a + b, c, a, c);
    printf("tape\n");
    printf("2 %d %d\n", m + 1, m + 2);
    printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, a, 0, a, c, b, c);
    printf("3 %d %d %f %f %d %f\n", 0, 0, b, c, 0, c);
    printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, a, 0, a, c, 0, c);
    h = m += 3;
  }
  h = rect2rect(a, c, x4 - x3, y4 - y3, h);
  if (x3 != 0 || y3 != 0) {
    printf("tape\n");
    printf("1 %d\n", h);
    printf("4 %f %f %f %f %f %f %f %f\n", x3, y3, x4, y3, x4, y4, x3, y4);
    printf("4 %f %f %f %f %f %f %f %f\n", x3, y3, x4, y3, x4, y4, x3, y4);
    h = ++m;
  }
  return h;
}
int rect2tri(double x0, double y0, double x1, double y1, double x2, double y2,
             double x3, double y3, double x4, double y4, int h) {
  double a, b, c;
  if (dot(x0, y0, x1, y1, x2, y2) < 0) {
    h = rect2tri(x1, y1, x2, y2, x0, y0, x3, y3, x4, y4, h);
    printf("tape\n");
    printf("1 %d\n", h);
    printf("3 %f %f %f %f %f %f\n", x1, y1, x2, y2, x0, y0);
    printf("3 %f %f %f %f %f %f\n", x0, y0, x1, y1, x2, y2);
    return ++m;
  }
  if (dot(x1, y1, x0, y0, x2, y2) < 0) {
    h = rect2tri(x2, y2, x0, y0, x1, y1, x3, y3, x4, y4, h);
    printf("tape\n");
    printf("1 %d\n", h);
    printf("3 %f %f %f %f %f %f\n", x2, y2, x0, y0, x1, y1);
    printf("3 %f %f %f %f %f %f\n", x0, y0, x1, y1, x2, y2);
    return ++m;
  }
  if (x0 != 0 || y0 != 0 || x1 <= x0 || y1 != y0) {
    double d = hypot(x1 - x0, y1 - y0), x1_ = (x1 - x0) / d,
           y1_ = (y1 - y0) / d;
    double x2_ = (x2 - x0) * x1_ + (y2 - y0) * y1_,
           y2_ = (y2 - y0) * x1_ - (x2 - x0) * y1_;
    h = rect2tri(0, 0, d, 0, x2_, y2_, x3, y3, x4, y4, h);
    printf("tape\n");
    printf("1 %d\n", h);
    printf("3 %f %f %f %f %f %f\n", x0, y0, x1, y1, x2, y2);
    printf("3 %f %f %f %f %f %f\n", x0, y0, x1, y1, x2, y2);
    return ++m;
  }
  a = x1, b = x2 / 2, c = y2 / 2;
  if (x3 != 0 || y3 != 0) {
    x4 -= x3, y4 -= y3, x3 = 0, y3 = 0;
    printf("tape\n");
    printf("1 %d\n", h);
    printf("4 %f %f %f %f %f %f %f %f\n", x3, y3, x4, y3, x4, y4, x3, y4);
    printf("4 %f %f %f %f %f %f %f %f\n", x3, y3, x4, y3, x4, y4, x3, y4);
    h = ++m;
  }
  h = rect2rect(x4, y4, a, c, h);
  if (b != 0) {
    printf("scissors\n");
    printf("%d 2\n", h);
    printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, a, 0, a, c, b, c);
    printf("3 %d %d %f %f %d %f\n", 0, 0, b, c, 0, c);
    printf("tape\n");
    printf("2 %d %d\n", m + 1, m + 2);
    printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, a, 0, a, c, b, c);
    printf("3 %f %d %f %f %f %f\n", a, 0, a + b, c, a, c);
    printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, a, 0, a + b, c, b, c);
    h = m += 3;
  }
  printf("scissors\n");
  printf("%d 2\n", h);
  printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, x1, 0, (x2 + x1) / 2, y2 / 2,
         x2 / 2, y2 / 2);
  printf("3 %f %f %f %f %f %d\n", x2 / 2 + x1, y2 / 2, (x2 + x1) / 2, y2 / 2,
         x1, 0);
  printf("tape\n");
  printf("2 %d %d\n", m + 1, m + 2);
  printf("4 %d %d %f %d %f %f %f %f\n", 0, 0, x1, 0, (x2 + x1) / 2, y2 / 2,
         x2 / 2, y2 / 2);
  printf("3 %f %f %f %f %f %f\n", x2 / 2, y2 / 2, (x2 + x1) / 2, y2 / 2, x2,
         y2);
  printf("3 %f %f %f %f %f %f\n", x0, y0, x1, y1, x2, y2);
  h = m += 3;
  return h;
}
int ii_[10], n_;
int inside(int i, int j) {
  int p = (i - 1 + n_) % n_, q = (i + 1 + n_) % n_;
  double cpq = cross(ii_[i], ii_[p], ii_[q]);
  double cpj = cross(ii_[i], ii_[p], ii_[j]);
  double cjq = cross(ii_[i], ii_[j], ii_[q]);
  return cpq < 0 ? cpj < 0 && cjq < 0 : cpj < 0 || cjq < 0;
}
int check(int i, int j) {
  int k, l;
  if (!inside(i, j)) return 0;
  for (k = 0; k < n_; k++) {
    l = (k + 1) % n_;
    if (k == i || k == j || l == i || l == j) continue;
    if ((cross(ii_[i], ii_[j], ii_[k]) < 0) !=
            (cross(ii_[i], ii_[j], ii_[l]) < 0) &&
        (cross(ii_[k], ii_[l], ii_[i]) < 0) !=
            (cross(ii_[k], ii_[l], ii_[j]) < 0))
      return 0;
  }
  return 1;
}
int ii[10], jj[10], kk[10];
void triangulate(int n, int b) {
  int h, i, j, b1, b2;
  n_ = 0;
  for (i = 0; i < n; i++)
    if ((b & 1 << i) != 0) ii_[n_++] = i;
  if (n_ == 3) {
    m++, ii[m] = ii_[0], jj[m] = ii_[1], kk[m] = ii_[2];
    return;
  }
  for (i = 0; i < n_; i++)
    for (j = i + 1; j < n_; j++)
      if (check(i, j)) {
        b1 = b2 = 1 << ii_[j];
        for (h = i; h != j; h = (h + 1) % n_) b1 |= 1 << ii_[h];
        for (h = i; h != j; h = (h - 1 + n_) % n_) b2 |= 1 << ii_[h];
        triangulate(n, b1), triangulate(n, b2);
        return;
      }
}
int main() {
  static int xx1[10], yy1[10], xx2[10], yy2[10], hh[10];
  static double yy_[10];
  int n1, n2, m_, g, i, j, k;
  double s;
  scanf("%d", &n1);
  for (i = 0; i < n1; i++) scanf("%d%d", &xx1[i], &yy1[i]);
  scanf("%d", &n2);
  for (j = 0; j < n2; j++) scanf("%d%d", &xx2[j], &yy2[j]);
  s = 0;
  for (i = 0; i < n1; i++)
    s += cross2(xx1[i], yy1[i], xx1[(i + 1) % n1], yy1[(i + 1) % n1]);
  s = sqrt(s / 2);
  xx = xx1, yy = yy1;
  m = 0, triangulate(n1, (1 << n1) - 1);
  printf("scissors\n");
  printf("0 %d\n", n1 - 2);
  for (g = 1; g < n1 - 1; g++) {
    i = ii[g], j = jj[g], k = kk[g];
    printf("3 %d %d %d %d %d %d\n", xx1[i], yy1[i], xx1[j], yy1[j], xx1[k],
           yy1[k]);
  }
  for (g = 1; g < n1 - 1; g++) {
    i = ii[g], j = jj[g], k = kk[g];
    yy_[g] = yy_[g - 1] + cross(i, j, k) / 2 / s;
    hh[g] = tri2rect(xx1[i], yy1[i], xx1[j], yy1[j], xx1[k], yy1[k], 0,
                     yy_[g - 1], s, yy_[g], g);
  }
  printf("tape\n");
  printf("%d", n1 - 2);
  for (g = 1; g < n1 - 1; g++) printf(" %d", hh[g]);
  printf("\n");
  for (g = 1; g < n1 - 1; g++)
    printf("4 %d %f %f %f %f %f %d %f\n", 0, yy_[g - 1], s, yy_[g - 1], s,
           yy_[g], 0, yy_[g]);
  printf("4 %d %d %f %d %f %f %d %f\n", 0, 0, s, 0, s, s, 0, s);
  m++;
  xx = xx2, yy = yy2;
  m_ = m, m = 0, triangulate(n2, (1 << n2) - 1);
  for (g = 1; g < n2 - 1; g++) {
    i = ii[g], j = jj[g], k = kk[g];
    yy_[g] = yy_[g - 1] + cross(i, j, k) / 2 / s;
  }
  printf("scissors\n");
  printf("%d %d\n", m_, n2 - 2);
  for (g = 1; g < n2 - 1; g++) {
    i = ii[g], j = jj[g], k = kk[g];
    printf("4 %d %f %f %f %f %f %d %f\n", 0, yy_[g - 1], s, yy_[g - 1], s,
           yy_[g], 0, yy_[g]);
  }
  m += m_;
  for (g = 1; g < n2 - 1; g++) {
    i = ii[g], j = jj[g], k = kk[g];
    hh[g] = rect2tri(xx2[i], yy2[i], xx2[j], yy2[j], xx2[k], yy2[k], 0,
                     yy_[g - 1], s, yy_[g], m_ + g);
  }
  printf("tape\n");
  printf("%d", n2 - 2);
  for (g = 1; g < n2 - 1; g++) printf(" %d", hh[g]);
  printf("\n");
  for (g = 1; g < n2 - 1; g++) {
    i = ii[g], j = jj[g], k = kk[g];
    printf("3 %d %d %d %d %d %d\n", xx2[i], yy2[i], xx2[j], yy2[j], xx2[k],
           yy2[k]);
  }
  printf("%d", n2);
  for (j = 0; j < n2; j++) printf(" %d %d", xx2[j], yy2[j]);
  printf("\n");
  m++;
  return 0;
}