def solve(): def rec(a, b, c): ret = binom[a + b + c - 1][b - 1] ret += rec2(a - 1, b, c - 1) return ret def rec2(a, b, c): if memo[a][c] == 0: ret = binom[a + b + c][b - 1] ret += binom[b + c][b] if a == 0 else rec2(a - 1, b, c) ret += binom[a + b][a] if c == 0 else rec2(a, b, c - 1) memo[a][c] = ret return memo[a][c] N = 333 binom = [[1]] for i in range(1, N + 1): binom += [[1] + [a + b for a, b in zip(binom[-1][1:], binom[-1][0:])] + [1]] T = int(raw_input()) for _ in range(T): a, b, c = map(int, raw_input().split()) memo = [[0] * (c + 1) for _ in range(a + 1)] print(rec(a, b, c) % (10 ** 9 + 7)) solve()