# 配列によるメモ化再帰 mod = 10**9+7 memod = [[0] * 222 for _ in range(222)] memo = [[0] * 222 for _ in range(222)] def calc(a, b): if a == 1 or b == 1: return 1 if memod[a][b]: return memo[a][b] memod[a][b] = 1 memo[a][b] = (calc(a, b - 1) + calc(a - 1, b)) % mod return memo[a][b] def solve(): a, b, c = map(int, input().split()) ans = 0 ans += calc(a, b + c + 1) ans += calc(b, c + a + 1) ans += calc(c, a + b + 1) if ans > mod: ans %= mod for i in range(a): for j in range(b): for k in range(c): x = calc(i+1, c-k) x *= calc(j+1, a-i) if x > mod: x %= mod x *= calc(k+1, b-j) if x > mod: x %= mod ans += x if ans > mod: ans %= mod return ans t = int(input()) for _ in range(t): print(solve())