beecrowd | 1758

Bonus Grade Points

By Victor Marcilio Peixoto, UNIVASF BR Brazil

Timelimit: 2

Professor Charles teaches in a school whose evalutation criteria is the following:


average ≥ 7.0 = PASS

4.0 ≤ average < 7.0 = FINAL EXAM

average < 4.0 = FAIL


Professor Charles decided to round the student grades based on their perfomance and the following rules:

1 - If the result of a rounding is lower than the original grade, the original grade will be final result.

2 - Roudings that change the student final verdict (PASS, FINAL, FAIL) are not allowed.

3 - Students that passed or are able to do the final exam will have their average replace by the highest grade obtained in the tests.

4 - Students that failed were lazy and will not receive any bonus points.

Rule 3 must be applied always when possible, as long as it does not violate rules 1 or 2.

Write a program that takes as input the grades obtained by the students in each test and calcuate their average based on the criteria stablished by Professor Charles.

Input

The first input line contains the integer T ( 1 ≤ T ≤ 5000), the number of test cases.

The first line of a test cases contains the integers P (2 ≤ P ≤ 5) and N (2 ≤ N ≤ 50), indicating the number of exams the professor applied and the number of students enrolled in the course, respectively.

The following N lines will have P floating point numbers (with 1 number after decimal point) each, indicating the grades (0.0 ≤ grade ≤ 10.0) obtained by the ith student in each of the exams.

Output

For each student print a single line containing the average obtained by him after the Professor Charles' rounding rules. The average must contain 2 digits after decimal point.

Input Sample Output Sample

2

3 5
3.1 7.7 0.5
0.5 5.9 5.5
0.1 8.5 9.2
9.3 4.6 8.0
5.4 3.5 0.0

5 3
9.0 10.0 6.0 6.0 6.0
10.0 5.0 5.0 5.0 5.0
10.0 5.0 5.0 4.0 0.0

3.77
3.97
5.93
9.30
2.97

10.00
6.00
5.00