Time Limit: 2 Seconds
Memory Limit: 65536 KB
Few weeks ago, a famous software company has upgraded its instant messaging software. A ranking system was released for user groups. Each member of a group has a level placed near his nickname. The level shows the degree of activity of a member in the group.
Each member has a score based his behaviors in the group. The level is determined by this method:
|Level||Percentage||The number of members in this level|
|LV1||/||All members whose score is zero|
|LV2||/||All members who can not reach level 3 or higher but has a positive score|
|LV3||30%||⌊(The number of members with a positive score) * 30%⌋|
|LV4||20%||⌊(The number of members with a positive score) * 20%⌋|
|LV5||7%||⌊(The number of members with a positive score) * 7%⌋|
|LV6||3%||⌊(The number of members with a positive score) * 3%⌋|
Please write a program to calculate the level for each member in a group.
There are multiple test cases. The first line of input is an integer T indicating the number of test cases. For each test case:
The first line contains an integer N (1 <= N <= 2000) indicating the number of members in a group.
The next N lines, each line contains three parts (separated by a space):
For each test case, output N lines. Each line contains a string represents the level of the i-th member.
1 5 123456 2011/03/11 308 123457 2011/03/12 308 333333 2012/03/18 4 555555 2014/02/11 0 278999 2011/03/18 308