You are given a set of polygons on a plane that satisfy the following conditions:
No two polygons share any points (neither edges nor vertices).
For each polygon , there exist P_i polygons that contain it, and N-1-P_i polygons that it contains, where 0 \leq P_i \leq N-1.
Your task is to determine, for each polygon, how many polygons contain it.
The first line contains an integer (3 \leq N \leq 10000) — the number of polygons. Each of the next lines describes a polygon as follows:
The (i+1)-th line starts with an integer C_i (3 \leq C_i \leq 20) — the number of vertices of the -th polygon. Then follow C_i pairs of integers — the coordinates of the polygon's vertices in order of traversal. The coordinates are integers in the range from to .
Print integers in a single line. The -th integer should be P_i — the number of polygons that contain the -th polygon.
1-nji mysal