A fabric is represented by three properties:
Ada and Charles work at the Kick Start fabric factory. Each day they receive N fabrics, and one of them has to sort it. They sort it using the following criteria:
Given N fabrics, count the number of fabrics which end up in the same position regardless of whether Ada or Charles sort them.
The first line of the input gives the number of test cases, T. T test cases follow.
Each test case begins with one line consisting of an integer N denoting the number of fabrics. Then N lines follow, each line with a string C_i, an integer D_i, and an integer U_i: the color, the durability and the unique identifier of the i-th fabric respectively.
For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the number of fabrics which end up in the same position regardless of whether a worker sorts them by color or by durability.