{"raw_statement":[{"iden":"problem statement","content":"You are given an integer $N$. For length-$N^2$ integer sequences $a$ and $b$ consisting of integers between $1$ and $N$ (inclusive), we define their distance $d(a,b)$ as follows:\n\n*   $d(a,b)=$ \"the number of indices $i$ ($1 \\leq i \\leq N^2$) such that $a_i \\neq b_i$.\"\n\nNow, you will create $N$ length-$N^2$ integer sequences consisting of integers between $1$ and $N$, and denote them as $x_1,x_2,\\cdots,x_N$ (their order also matters). Find the number, modulo $998244353$, of instances of $(x_1,x_2,\\cdots,x_N)$ satisfying the following condition.\n\n*   For any length-$N^2$ integer sequence $y$ consisting of integers between $1$ and $N$, there exists some $1 \\leq i \\leq N$ such that $d(x_i,y) \\geq N^2-N$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 50$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"2"},{"iden":"sample output 1","content":"80\n\nFor example, $(x_1,x_2)=((1,1,2,2),(1,2,1,2))$ does not satisfy the condition, because if $y=(1,1,1,2)$, then $d(x_1,y)=1,d(x_2,y)=1$.\nOn the other hand, $(x_1,x_2)=((1,1,1,1),(2,2,2,2))$ satisfies the condition.\nThere are $80$ instances of $(x_1,x_2)$ that satisfy the condition."},{"iden":"sample input 2","content":"3"},{"iden":"sample output 2","content":"597965565"},{"iden":"sample input 3","content":"10"},{"iden":"sample output 3","content":"241191911"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}