ACM-ICPC INC 2008 Qualification

Problem A

Who Got the Medals?

Time Limit: 3s

A certain competition uses a 400 - 600 scoring system (also called as 500 scaling system). All competitors' score will vary between these ranges.

Medals are only given to competitors who score at least 500 points. Normally there would be only three winners, the first (gold medal), the second (silver medal) and the third (bronze medal). But in this competition, there is an additional rule if the score difference between winner candidates is not more than 2 points (this condition is also noted as ex aequo). When this condition occurs, the ex aequo medals will be awarded as follows:

The first winner and any competitors who score at most 2 points less than the first winner will receive gold medals. The following rules apply when there are more than one gold medalists:
  • No silver medal will be awarded.
  • If there are two gold medalists, then the third winner and any competitors who score at most 2 points less than the third winner will receive bronze medals.
  • If there are more than two gold medalists, then the bronze medals will be awarded to those who score at most 2 points less than the lowest gold medalist's score.
If there's only one gold medalist, the second winner and any competitors who score at most 2 points less than the second winner will receive silver medal. If there are more than one silver medalists, then bronze medals will be awarded to those who score at most 2 points less than the lowest silver medalist's score.

If there's only one gold medalist and one silver medalist, then the third winner and any competitors who score at most 2 points less than the third winner will receive bronze medal.

Excellence medallion will be awarded to those who failed to get any medals but still able to score at least 500 points.

Given each competitor's score, write a program to count the number of medals that have to be prepared by the committee!

Input

The first line of input contains an integer T, the number of test cases follow.

Each test case begins with an integer N (1 <= N <= 1000) the number of competitors. The next line contains N integers each between 400 and 600, inclusive, denoting each competitor's score.

Output

For each test case, output 4 number each separated by a single space, denoting the number of gold, silver,bronze and excellence medallion respectively that should be prepared by the comitee.

Sample InputOutput for Sample Input
2
6
478 568 554 436 510 500
3
456 496 548
1 1 1 1
1 0 0 0