Circle is an ancient and universal symbol of unity, wholeness, infinity, the goddess, and female power. It is referenced frequently in religion and art. In this problem, we act as a modern artist and would like to draw our painting with points and circles, and clearly colors should be used. First, we put some colored points on the canvas. The goal is to draw a circle for each color Ci
There are multiple test cases in the input. For each test case, in the first line there is a positive integer n
For each test case, write a single line which contains the largest number of colors for which there exists a circle conforming to the above conditions.
Input
Output
Sample Input
4
red 1 1
blue 1 2
blue 3 2
yellow 3 3
0
Sample Output
1