import java.util.ArrayDeque; import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } long MODULO = 1_000_000_000 + 7; long[][] comb = new long[300][300]; void run() { comb[0][0] = 1; for (int i = 1; i < comb.length; ++i) { for (int j = 0; j <= i; ++j) { comb[i][j] = (comb[i - 1][j] + (j > 0 ? comb[i - 1][j - 1] : 0)) % MODULO; } } Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 0; i < rec.length; ++i) { for (int j = 0; j < rec[i].length; ++j) { for (int k = 0; k < rec[i][j].length; ++k) { rec[i][j][k] = -1; } } } for (int i = 0; i < n; ++i) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); System.out.println(f(a, b, c)); } } long[][][] rec = new long[101][101][101]; long f(int a, int b, int c) { if (a < 0 || b < 0 || c < 0) { return 0; } if (a == 0 && b == 0 && c == 0) { return 1; } if (rec[a][b][c] != -1) { return rec[a][b][c]; } int all = a + b + c - 1; long ret = ((a > 0 ? comb[all][a - 1] : 0) + (b > 0 ? comb[all][b - 1] : 0) + (c > 0 ? comb[all][c - 1] : 0)) % MODULO; if (a > 0 && b > 0 && c > 0) { for (int i = 0; i < a; ++i) { for (int j = 0; j < b; ++j) { for (int k = 0; k < c; ++k) { ret += f(i, (c - 1) - k, 0) * f((a - 1) - i, j, 0) * f((b - 1) - j, k, 0); } } } } ret %= MODULO; rec[a][b][c] = ret; return ret; } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }