#include using namespace std; #include using namespace atcoder; using mint=modint1000000007; using ll=long long; using pp=pair; #define sr string #define vc vector #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)n;i++) #define pb push_back #define all(v) v.begin(),v.end() #define pque priority_queue #define bpc(a) __builtin_popcount(a) int main(){ ll n,m;cin>>n>>m; vc dp(n+1,vc(n*n+1,0)); dp[0][0]=1; rep(z,2*n){ vc pre(n+1,vc(n*n+1,0)); swap(pre,dp); rep(i,n+1)rep(j,n*n+1){ if(j+(z-i)/2<=n*n&&i+1<=n)dp[i+1][j+(z-i)/2]=(dp[i+1][j+(z-i)/2]+pre[i][j])%m; if(i)dp[i-1][j]=(dp[i-1][j]+pre[i][j])%m; } } rep(i,n*n+1)cout<