Sample input 2
4
DCCD
C 0 7
D 4 5
C -2 1
D -2 3
Sample output 2
2
-3.5 -2.333333 -2.333333 -2
Sample input 3
4
DCDC
C 0 7
D 4 5
C -2 1
D -2 3
Sample output 3
0
The picture below shows that if the boy looks from the point x = -7 he sees the chimneys in the following order: C, D, D, C. It is so for any point from the set (-∞,-11) ∪ (-11,-3.5) ∪ (14,+∞) - the first example from the problem statement.