P21455 [HackerEarth] 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
普及-
题目描述

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.
First kind of painting needs 3 white color pens.
Second kind of painting needs 3 red color pens.
Third kind of painting needs 3 green color pens.
Fourth kind of painting needs 1 white, 1 red and 1 green color pen.

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 ≤ 10^9

SAMPLE INPUT
1
4 4 4

SAMPLE OUTPUT
4

Explanation

Oz can make 1 first kind, 1 second kind, 1 third kind and 1 fourth kind painting

输入格式

见题面

输出格式

见题面

样例输入
10 775140200 616574841 630329230 524780569 326748594 90361407 937984449 184405994 992844522 835108464 525983528 452876698 879716125 531124573 207876166 292920005 241298326 667908343 1000000000 1000000000 1000000000 1000000000 999999999 999999998 999999998 999999998 999999999 0 1 1
样例输出
674014756 313963523 705078321 604656229 539572288 400708891 1000000000 999999998 999999998 0