Given positive integers N, K and M, solve the following problem for every integer x between 1 and N (inclusive):
 - 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.

-----Constraints-----
 - 1 \leq N, K \leq 100
 - 10^8 \leq M \leq 10^9 + 9
 - M is prime.
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N K M

-----Output-----
Use the following format:
c_1
c_2
:
c_N

Here, c_x should be the number, modulo M, of multisets such that the average of the elements is x.

-----Sample Input-----
3 1 998244353

-----Sample Output-----
1
3
1

Consider non-empty multisets containing between 0 and 1 instance(s) of each of the integers between 1 and 3. Among them, there are:
 - one multiset such that the average of the elements is k = 1: \{1\};
 - three multisets such that the average of the elements is k = 2: \{2\}, \{1, 3\}, \{1, 2, 3\};
 - one multiset such that the average of the elements is k = 3: \{3\}.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "\n\nimport numpy as np\nfrom numba import njit\n@njit\ndef main(n,k,mod):\n    l=k*(n*(n+1))//2\n    dp=np.zeros((n+1,l+1),dtype=np.int32)\n    # dp[i][j]:iまでの数字を使い、合計がjになるものの個数\n    # O(N^3*k)<=O(10^8)で計算可能らしい\n    dp[0,0]=1\n    ary=np.ones((1,l+2),dtype=np.int32)\n    ary[0,0]=0\n    for i in range(1,n+1):\n        nary=np.zeros((i+1,2+l//i),dtype=np.int32)\n        for j in range(l+1):\n            a=j//i\n            b=max(0,j//i-k)\n            dp[i,j]=ary[j%i,a+1]-ary[j%i,b]\n            dp[i,j]%=mod\n            nary[j%(i+1),j//(i+1)+1]=dp[i,j]\n            nary[j%(i+1),j//(i+1)+1]+=nary[j%(i+1),j//(i+1)]\n            nary[j%(i+1),j//(i+1)+1]%=mod\n        ary=nary\n    ret=[]\n    for i in range(1,n+1):\n        # 左区間=[1,i-1]\n        # 右区間=[1,n-i]\n        ans=0\n        num=dp[i-1,0]\n        num*=dp[n-i,0]\n        ans+=num*k\n        ans%=mod\n        for j in range(1,l+1):\n            num=dp[i-1,j]\n            num*=dp[n-i,j]\n            num%=mod\n            ans+=(num*(k+1))%mod\n            ans%=mod\n        ret.append(ans)\n    #for x in ret:\n    #    print(x)\n    return ret\n\nn,k,mod=map(int,input().split())\nprint(*main(n,k,mod),sep='\\n')"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: