# July 9 - ADA Training

# Segments

*No two letters should have a common point. As well as the general dash*

*Guide for telegraphists*

The director of the Institute of Segments Geometry (ISG) invited Aaz to his office. According to the surroundings, the institution was not in poverty. But the problem at this time was different.

We are not out of work. Each time after the start of the season in the programming championship, we solve a lot of problems about the intersection of two segments on request of competition organizers. But it is still routine, and employees begin to lose interest. In some places, even instead of work some are involved in amateur - they organize concerts for accordion by candlelight. Can you formulate the problem for us, other than this, but not very far from it for the formulation of a bygone.

For example... Given **n** segments on a line. For each segment find the number of other segments that have with it at least one common point.

ISG staff enthusiastically took up the task. Moreover - they instructed you to write a program to solve it.

#### Input

Contains multiple test cases. First line of each test case contains the number of segments **n** (**1** ≤ **n** ≤ `10`

). Each of the next ^{5}**n** lines describes the segments: **i**-th line contains pair of integers `L`

and _{i}`R`

- the start and end coordinates of _{i}**i**-th segment (`-10`

≤ ^{9}`L`

≤ _{i}`R`

≤ _{i}`10`

). The total sum of values ^{9}**n** in input does not exceed `10`

. Input data terminates with zero. The number of test cases is no more than ^{5}`10`

.^{4}

#### Output

For each test print in one line **n** numbers as shown in sample: **i**-th line is the number of segments with which the **i**-th segment has at least one common point, not counting itself. Follow the output format as closely as possible.

3 1 2 2 3 3 4 4 1 6 2 3 4 5 7 8 0

Case 1: 1 2 1 Case 2: 2 1 1 0