{"raw_statement":[{"iden":"problem statement","content":"Given positive integers $N, K$ and $M$, solve the following problem for every integer $x$ between $1$ and $N$ (inclusive):\n\n*   Find the number, modulo $M$, of non-empty multisets containing between $0$ and $K$ (inclusive) instances of each of the integers $1, 2, 3 \\cdots, N$ such that the average of the elements is $x$."},{"iden":"constraints","content":"*   $1 \\leq N, K \\leq 100$\n*   $10^8 \\leq M \\leq 10^9 + 9$\n*   $M$ is prime.\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$ $M$"},{"iden":"sample input 1","content":"3 1 998244353"},{"iden":"sample output 1","content":"1\n3\n1\n\nConsider non-empty multisets containing between $0$ and $1$ instance(s) of each of the integers between $1$ and $3$. Among them, there are:\n\n*   one multiset such that the average of the elements is $k = 1$: ${1}$;\n*   three multisets such that the average of the elements is $k = 2$: ${2}, {1, 3}, {1, 2, 3}$;\n*   one multiset such that the average of the elements is $k = 3$: ${3}$."},{"iden":"sample input 2","content":"1 2 1000000007"},{"iden":"sample output 2","content":"2\n\nConsider non-empty multisets containing between $0$ and $2$ instances of each of the integers between $1$ and $1$. Among them, there are:\n\n*   two multisets such that the average of the elements is $k = 1$: ${1}, {1, 1}$."},{"iden":"sample input 3","content":"10 8 861271909"},{"iden":"sample output 3","content":"8\n602\n81827\n4054238\n41331779\n41331779\n4054238\n81827\n602\n8"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}