1. /* in the name of Anton */
  2.  
  3. /*
  4. Compete against Yourself.
  5. Author - Aryan (@aryanc403)
  6. Atcoder library - https://atcoder.github.io/ac-library/production/document_en/
  7. */
  8.  
  9. #ifdef ARYANC403
  10. #include <header.h>
  11. #else
  12. #pragma GCC optimize ("Ofast")
  13. #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
  14. //#pragma GCC optimize ("-ffloat-store")
  15. #include<bits/stdc++.h>
  16. #define dbg(args...) 42;
  17. #endif
  18.  
  19. // y_combinator from @neal template https://codeforces.com/contest/1553/submission/123849801
  20. // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0200r0.html
  21. template<class Fun> class y_combinator_result {
  22. Fun fun_;
  23. public:
  24. template<class T> explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {}
  25. template<class ...Args> decltype(auto) operator()(Args &&...args) { return fun_(std::ref(*this), std::forward<Args>(args)...); }
  26. };
  27. template<class Fun> decltype(auto) y_combinator(Fun &&fun) { return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun)); }
  28.  
  29. using namespace std;
  30. #define fo(i,n) for(i=0;i<(n);++i)
  31. #define repA(i,j,n) for(i=(j);i<=(n);++i)
  32. #define repD(i,j,n) for(i=(j);i>=(n);--i)
  33. #define all(x) begin(x), end(x)
  34. #define sz(x) ((lli)(x).size())
  35. #define pb push_back
  36. #define mp make_pair
  37. #define X first
  38. #define Y second
  39. #define endl "\n"
  40.  
  41. typedef long long int lli;
  42. typedef long double mytype;
  43. typedef pair<lli,lli> ii;
  44. typedef vector<ii> vii;
  45. typedef vector<lli> vi;
  46.  
  47. const auto start_time = std::chrono::high_resolution_clock::now();
  48. void aryanc403()
  49. {
  50. #ifdef ARYANC403
  51. auto end_time = std::chrono::high_resolution_clock::now();
  52. std::chrono::duration<double> diff = end_time-start_time;
  53. cerr<<"Time Taken : "<<diff.count()<<"\n";
  54. #endif
  55. }
  56.  
  57. long long readInt(long long l, long long r, char endd) {
  58. long long x=0;
  59. int cnt=0;
  60. int fi=-1;
  61. bool is_neg=false;
  62. while(true) {
  63. char g=getchar();
  64. if(g=='-') {
  65. assert(fi==-1);
  66. is_neg=true;
  67. continue;
  68. }
  69. if('0'<=g&&g<='9') {
  70. x*=10;
  71. x+=g-'0';
  72. if(cnt==0) {
  73. fi=g-'0';
  74. }
  75. cnt++;
  76. assert(fi!=0 || cnt==1);
  77. assert(fi!=0 || is_neg==false);
  78.  
  79. assert(!(cnt>19 || ( cnt==19 && fi>1) ));
  80. } else if(g==endd) {
  81. if(is_neg) {
  82. x=-x;
  83. }
  84. assert(l<=x&&x<=r);
  85. return x;
  86. } else {
  87. assert(false);
  88. }
  89. }
  90. }
  91. string readString(int l, int r, char endd) {
  92. string ret="";
  93. int cnt=0;
  94. while(true) {
  95. char g=getchar();
  96. assert(g!=-1);
  97. if(g==endd) {
  98. break;
  99. }
  100. cnt++;
  101. ret+=g;
  102. }
  103. assert(l<=cnt&&cnt<=r);
  104. return ret;
  105. }
  106. long long readIntSp(long long l, long long r) {
  107. return readInt(l,r,' ');
  108. }
  109. long long readIntLn(long long l, long long r) {
  110. return readInt(l,r,'\n');
  111. }
  112. string readStringLn(int l, int r) {
  113. return readString(l,r,'\n');
  114. }
  115. string readStringSp(int l, int r) {
  116. return readString(l,r,' ');
  117. }
  118.  
  119. void readEOF(){
  120. assert(getchar()==EOF);
  121. }
  122.  
  123. vi readVectorInt(int n,lli l,lli r){
  124. vi a(n);
  125. for(int i=0;i<n-1;++i)
  126. a[i]=readIntSp(l,r);
  127. a[n-1]=readIntLn(l,r);
  128. return a;
  129. }
  130.  
  131. bool isBinaryString(const string s){
  132. for(auto x:s){
  133. if('0'<=x&&x<='1')
  134. continue;
  135. return false;
  136. }
  137. return true;
  138. }
  139.  
  140. // #include<atcoder/dsu>
  141. // vector<vi> readTree(const int n){
  142. // vector<vi> e(n);
  143. // atcoder::dsu d(n);
  144. // for(lli i=1;i<n;++i){
  145. // const lli u=readIntSp(1,n)-1;
  146. // const lli v=readIntLn(1,n)-1;
  147. // e[u].pb(v);
  148. // e[v].pb(u);
  149. // d.merge(u,v);
  150. // }
  151. // assert(d.size(0)==n);
  152. // return e;
  153. // }
  154.  
  155. const lli INF = 0xFFFFFFFFFFFFFFFL;
  156.  
  157. lli seed;
  158. mt19937 rng(seed=chrono::steady_clock::now().time_since_epoch().count());
  159. inline lli rnd(lli l=0,lli r=INF)
  160. {return uniform_int_distribution<lli>(l,r)(rng);}
  161.  
  162. class CMP
  163. {public:
  164. bool operator()(ii a , ii b) //For min priority_queue .
  165. { return ! ( a.X < b.X || ( a.X==b.X && a.Y <= b.Y )); }};
  166.  
  167. void add( map<lli,lli> &m, lli x,lli cnt=1)
  168. {
  169. auto jt=m.find(x);
  170. if(jt==m.end()) m.insert({x,cnt});
  171. else jt->Y+=cnt;
  172. }
  173.  
  174. void del( map<lli,lli> &m, lli x,lli cnt=1)
  175. {
  176. auto jt=m.find(x);
  177. if(jt->Y<=cnt) m.erase(jt);
  178. else jt->Y-=cnt;
  179. }
  180.  
  181. bool cmp(const ii &a,const ii &b)
  182. {
  183. return a.X<b.X||(a.X==b.X&&a.Y<b.Y);
  184. }
  185.  
  186. const lli mod = 1000000007L;
  187. // const lli maxN = 1000000007L;
  188.  
  189. lli T,n,i,j,k,in,cnt,l,r,u,v,x,y;
  190. lli m;
  191. string s;
  192. vi a;
  193. //priority_queue < ii , vector < ii > , CMP > pq;// min priority_queue .
  194.  
  195. int main(void) {
  196. ios_base::sync_with_stdio(false);cin.tie(NULL);
  197. // freopen("txt.in", "r", stdin);
  198. // freopen("txt.out", "w", stdout);
  199. // cout<<std::fixed<<std::setprecision(35);
  200. T=readIntLn(1,1e3);
  201. while(T--)
  202. {
  203. a=readVectorInt(3,1,1e3);
  204. cout<<a[0]*a[1]*a[2]<<endl;
  205. } aryanc403();
  206. readEOF();
  207. return 0;
  208. }