{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eIn this problem, we are going to deal with a special structure called Boolean 3-array.\u003cbr\u003e\u003cbr\u003eA $\\textit{Boolean 3-array}$ of size $m \\times n \\times p$ is a three-dimensional array denoted as $A$, where $A[i][j][k] \\in \\{0, 1\\}$ $(1 \\leq i \\leq m, 1 \\leq j \\leq n, 1 \\leq k \\leq p)$. We define any one of these as an $\\textit{operation}$ on a Boolean 3-array $A$ of size $m \\times n \\times p$:\u003cbr\u003e\u003cbr\u003e- Choose some fixed $a$ $(1 \\leq a \\leq m)$, then flip $A[a][j][k]$ for all $1 \\leq j \\leq n$, $1 \\leq k \\leq p$;\u003cbr\u003e- Choose some fixed $b$ $(1 \\leq b \\leq n)$, then flip $A[i][b][k]$ for all $1 \\leq i \\leq m$, $1 \\leq k \\leq p$;\u003cbr\u003e- Choose some fixed $c$ $(1 \\leq c \\leq p)$, then flip $A[i][j][c]$ for all $1 \\leq i \\leq m$, $1 \\leq j \\leq n$;\u003cbr\u003e- Choose some fixed $a_1, a_2$ $(1 \\leq a_1, a_2 \\leq m)$, then swap $A[a_1][j][k]$ and $A[a_2][j][k]$ for all $1 \\leq j \\leq n$, $1 \\leq k \\leq p$;\u003cbr\u003e- Choose some fixed $b_1, b_2$ $(1 \\leq b_1, b_2 \\leq n)$, then swap $A[i][b_1][k]$ and $A[i][b_2][k]$ for all $1 \\leq i \\leq m$, $1 \\leq k \\leq p$;\u003cbr\u003e- Choose some fixed $c_1, c_2$ $(1 \\leq c_1, c_2 \\leq p)$, then swap $A[i][j][c_1]$ and $A[i][j][c_2]$ for all $1 \\leq i \\leq m$, $1 \\leq j \\leq n$.\u003cbr\u003eHere \"filp\" means change the value of the element, i.e., replace 0 with 1 and replace 1 with 0.\u003cbr\u003e\u003cbr\u003eWe say two Boolean 3-arrays $A, B$ are $\\textit{essentially identical}$, if and only if any one of them can be transformed to the other, by applying operations finitely many times; otherwise, we say $A$ and $B$ are $\\textit{essentially different}$.\u003cbr\u003e\u003cbr\u003eNow, given the size of the Boolean 3-array, can you determine the maximum number of Boolean 3-arrays of given size you may choose, such that any two of them are essentially different?\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of input is a single integer $T$ $(1 \\leq T \\leq 300)$, the number of test cases.\u003cbr\u003e\u003cbr\u003eEach test case is a single line of three integers $n, m, p$ $(1 \\leq m, n, p \\leq 13)$, the size of the Boolean 3-array."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, display an integer in a single line: the answer modulo $998244353$."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n1 1 1\r\n2 2 2\r\n2 3 4\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n9\r\n723\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}