Score Tally

No attempts yetTime limit1sMemory limit128 MB

Problem

The Korean Gymnastics Association is changing how it tallies scores so that one bad call counts for less. Under the old rule, five judges each give an integer score from 1 to 10, one highest score and one lowest score are dropped, and the sum of the remaining three is the total. Under the new rule, if the highest and the lowest of those three remaining scores differ by 4 or more, the scores are adjusted and the routine is judged again.

Write a program that tallies the scores and prints the total, or prints KIN (Keep In Negotiation) instead of the total when the scores have to be adjusted and given again.

Input

The first line has the number of test cases TT (1T101 \le T \le 10).

Each of the next TT lines has the five integer scores NiN_i (1Ni101 \le N_i \le 10, i=1,2,,5i = 1, 2, \dots, 5) given by the five judges, separated by single spaces.

Output

For each test case, print the total on its own line. If the scores have to be adjusted and given again, print KIN instead of the total.