def memoize(f): cache = {} def helper(*args): if args not in cache: cache[args] = f(*args) return cache[args] return helper def solve(): def calc(a, b, c): ret = 0 for i in range(1, b + 1): ret += rec_tri(a - 1, i - 1) * rec_tri(c, b - i) ret += rec2(a - 1, b, c - 1) return ret @memoize def rec2(a, b, c): ret = 0 for i in range(1, b + 1): ret += rec_tri(a, i - 1) * rec_tri(c, b - i) ret += rec_tri(b, c) if a == 0 else rec2(a - 1, b, c) ret += rec_tri(a, b) if c == 0 else rec2(a, b, c - 1) return ret @memoize def rec_tri(a, b): ret = 0 if a == 0 or b == 0: return 1 return rec_tri(a - 1, b) + rec_tri(a, b - 1) T = int(raw_input()) for _ in range(T): a, b, c = map(int, raw_input().split()) print(calc(a, b, c) % (10 ** 9 + 7)) solve()