Chef Ash and Chef Elsh invented a new hash function! Their hash function will map a binary string consisting of characters 'A' and 'E' into an integer called the hash value of the string.
The pseudocode of the hash function is as below. hash(S) is the hash value of a binary string S. |S| denotes the length of S.

function hash(S):
	result = number of characters 'A' in S
	if |S| > 1:
		(S1, S2) = split(S)
		result = result + max(hash(S1), hash(S2))
	end if
	return result
end function
The function split in the above pseudocode takes a binary string S as the parameter and returns a pair of binary strings (S1, S2) such that:


|S1| <= |S2|.
The difference of |S1| and |S2| is at most 1.
The concatenation of S1 and S2 (in that order) is S.

For example, split("AAAEE") returns ("AA", "AEE"), whereas split("AEAEAE") returns ("AEA", "EAE").
You doubt that this hash function have good distribution of different hash values. So, you wonder how many different binary strings consisting of A 'A' characters and E 'E' characters that have hash value of V.

Input
The first line contains a single integer T, the number of test cases. T test cases follow. Each testcase consists of a single line consisting of three integers A, E, and V.

Output
For each test case, output a single line consisting the number of different binary strings satisfying the rule, modulo 1000000007.

Constraints

1 ≤ T ≤ 1000
0 ≤ A ≤ 50
0 ≤ E ≤ 50
0 ≤ V ≤ 1000


Example

Input:
4
0 0 0
1 0 1
3 2 6
4 2 8

Output:
1
1
3
4


Explanation
For the last test case, the solutions are:

AAEAAE
AEAAAE
AAEAEA
AEAAEA
import sys
import math

M = 1000000007

rs = {}

def fn(An, En, V):
    global rs, M
    if V < 0:
        return 0

    try:
        return rs[An][En][V]
    except:
        if rs.has_key(An):
            if not rs[An].has_key(En):
                rs[An][En] = {}
        else:
            rs[An] = {}
            rs[An][En] = {}

        rs[An][En][V] = None
        if V < An:
            rs[An][En][V] = 0
        else :
            if An ==0 or En == 0:
                if An == 0 and En == 0:
                    if V == 0:
                        rs[An][En][V] = 1
                    else:
                        rs[An][En][V] = 0
                else:                
                    if An == 1 and En == 0:
                        if V == 0:
                            rs[An][En][V] = 0
                        else:
                            rs[An][En][V] = 1
                    else:
                        if An == 0 and En == 1:
                            rs[An][En][V] = 1

        if rs[An][En][V] == None:
            vRemain = V - An
            s = (An + En) / 2
            cnt = 0
            for an1 in range(max(0, s - En), min(An, s)+1):
                try:
                    cnt1 = rs[an1][s - an1][vRemain]
                except:
                    cnt1 = fn(an1, s - an1, vRemain)
                try:
                    cnt2 = rs[An - an1][En - s + an1][vRemain]
                except:
                    cnt2 = fn(An - an1, En - s + an1, vRemain)
                cnt +=  cnt1 * cnt2
            rs[An][En][V] = cnt % M
        return rs[An][En][V]
    
def main():        
    testCases = int(sys.stdin.readline())
    cases = []
    for n in range(0, testCases):
        An, En, V = sys.stdin.readline().split(' ')
        print "%s" % ((fn(int(An), int(En), int(V)) - fn(int(An), int(En), int(V)-1) + M ) % M)
 
if __name__ == '__main__':
    main()