#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) //------------------------------------------------------- int N; ll memo[101][101][101]; ll memo2[101][101]; ll mo=1000000007; ll hoge2(int A,int B) ; ll hoge(int A,int B,int C) { if(A==0) return 0; ll& ret=memo[A][B][C]; if(ret>=0) return ret; int i,j; ret = 0; // only B for(i=1;i<=B;i++) (ret += hoge(A-1,i,C))%=mo; // B&C; for(i=1;i<=B;i++) for(j=1;j<=C;j++) (ret += hoge2(i,j)*hoge2(C+1-j,A)%mo)%=mo; return ret; } ll hoge2(int A,int B) { ll& ret=memo2[A][B]; if(ret>=0) return ret; if(A<=1 || B<=1) return 1; ret=0; for(int x=1;x<=B;x++) (ret+=hoge2(x,A-1))%=mo; return ret; } void solve() { int i,j,k,l,r,x,y; string s; int A,B,C; MINUS(memo); MINUS(memo2); cin>>N; while(N) { N--; cin>>A>>B>>C; ll ret=hoge(A,B,C); for(i=1;i<=A;i++) (ret+=hoge2(i,B+1)*hoge2(A+1-i,C))%=mo; for(i=1;i<=B;i++) (ret+=hoge2(i,A+1)*hoge2(B+1-i,C))%=mo; for(i=1;i<=C;i++) (ret+=hoge2(i,A+1)*hoge2(C+1-i,B))%=mo; cout<