Today Oz wants to make some money through his paintings. For painting, Oz has X white color pens, Y red color pens and Z green color pens. Their are 4 types of paintings he wants to make i.e.
Oz wants to earn more money so he wants to make maximum number of paintings. Help Oz to find the maximum number of paintings he can make.
Input :
The first line contains the number of test cases T. Each test case consists of 3 integers X, Y and Z — the number of white, red and green color pens.
Output :
For each test case print the maximum number of paintings Oz can make.
Constraint :
1 ≤ T ≤ 10
0 ≤ X, Y, Z ≤ 109
Oz can make 1 first kind, 1 second kind, 1 third kind and 1 fourth kind painting