For a positive integer $$$d$$$, let $$$[d]=\{1,2,\dots,d\}$$$. You are given three positive integers $$$a,b,c$$$.
Construct a set $$$S\subseteq[a]\times[b]\times[c]$$$ of integer triples satisfying all of the following conditions:
In other words, deleting any one coordinate from the triples in $$$S$$$ must produce every possible pair of the other two coordinates. The size $$$|S|$$$ must be as small as possible.
The first line contains an integer $$$T$$$ ($$$1\le T\le 100$$$), the number of test cases.
For each test case, one line contains three integers $$$a,b,c$$$ ($$$1\le a\le 100$$$, $$$1\le b\le 100$$$, $$$1\le c\le 100$$$).
For each test case, print several lines:
The $$$m$$$ triples must be pairwise distinct. Their order does not matter. If several minimum-size sets are valid, output any one of them.
21 1 12 2 2
1 1 1 1 4 1 1 1 1 2 2 2 1 2 2 2 1
The sample output is one possible answer. Other valid minimum-size sets are also accepted.
| Name |
|---|


