A design tool draws logos as collections of geometric shapes that are later cut out of a special fluorescent material. For the cutting to work, the shapes in a picture must not intersect. Some logos, however, do contain intersecting shapes, so you must detect them.
Given a set of geometric shapes, determine, for every shape, which other shapes it intersects. Only the outlines (boundaries) of the shapes are considered: two shapes intersect exactly when their outlines have at least one common point (they cross or merely touch). In particular, if one shape lies entirely inside another one and their outlines do not touch, that is not an intersection.

The input contains several pictures. Each picture describes at most 26 shapes, one per line. Every line begins with an uppercase letter that uniquely identifies the shape within its picture, followed by the shape kind and two or more points, all separated by at least one space. The possible shape kinds are:
Every point is written as two integer coordinates $X$ and $Y$ separated by a comma and enclosed in parentheses, i.e. (X,Y). All coordinates satisfy $|X|, |Y| \le 10000$.
Each picture's description ends with a line containing a single dash (-). After the last picture there is a line containing a single dot (.).
For each picture, print one line for every shape, in alphabetical order of its identifier. Each line must have one of the following forms:
X has no intersections — if $X$ intersects no other shape.X intersects with A — if $X$ intersects exactly one other shape $A$.X intersects with A and B — if $X$ intersects exactly two other shapes.X intersects with A, B, ..., and Z — if $X$ intersects more than two other shapes (note the additional comma before and).The listed identifiers are the intersecting shapes in alphabetical order.
Separate the output of consecutive pictures with a single empty line.