A team of three is competing in a programming contest. All three have read every problem and estimated, for each one, how many minutes it would take that person to solve it. The team now wants to split the problems so that it solves as many of them as possible in the time that is left.
Every member writes the whole solution out on paper before sitting down at the computer, so nobody ever waits for the machine. Only one condition applies: for each team member, the estimated solving times of the problems that member takes must add up to no more than the time left in the contest.
A problem goes to at most one member, and a member cannot be given a problem that person is unable to solve.
The first line has the number of test cases t (1≤t≤100). Each test case is given as follows.
For each test case, print on one line the largest number of problems the team can solve.