2335: profile

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:6 Solved:6

Description

每一个建筑物用一个三元组表示(L, H, R), 表示左边界, 高度和右边界
轮廓线用X, Y, X, Y…这样的交替式表示
下图的轮廓线为: (1, 11), (3, 13), (9, 0), (12, 7), (16, 3), (19, 18), (22, 3), (23, 13), (29, 0)
给N个建筑,求轮廓线



Input

读入N。
之后N行。每行3个数。表示L.H.R

Output

输出轮廓线。 输出格式 (X,Y)(X,Y)……。

Sample Input Copy

8
1 11 5
2 6 7
3 13 9
12 7 16
15 3 25
19 18 22
23 13 29
24 4 28

Sample Output Copy

(1,11)(3,13)(9,0)(12,7)(16,3)(19,18)(22,3)(23,13)(29,0)

HINT

50%的数据n<=100
100%的数据 n<=100000

Source/Category