#include <bits/stdc++.h>
using namespace std;

#define Gene template< class
#define Rics printer& operator,
Gene c> struct rge{c b, e;};
Gene c> rge<c> range(c i, c j){ return {i, j};}
struct printer{
    ~printer(){cerr<<endl;}
    Gene c >Rics(c x){ cerr<<boolalpha<<x; return *this;}
    Rics(string x){cerr<<x;return *this;}
    Gene c, class d >Rics(pair<c, d> x){ return *this,"(",x.first,", ",x.second,")";}
    Gene ... d, Gene ...> class c >Rics(c<d...> x){ return *this, range(begin(x), end(x));}
    Gene c >Rics(rge<c> x){
        *this,"["; for(auto it = x.b; it != x.e; ++it)
            *this,(it==x.b?"":", "),*it; return *this,"]";}
};
#define debug() cerr<<"LINE "<<__LINE__<<" >> ", printer()
#define dbg(x) "[",#x,": ",(x),"] "
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int my_rand(int l, int r) {
    return uniform_int_distribution<int>(l, r) (rng);
}

const int N = 105;

int mod;
int dp[N][N*N*N];

int main() {
//    freopen("in.txt", "r", stdin);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n, K;
    cin >> n >> K >> mod;

    dp[0][0] = 1;
    int sum = 0;
    for(int i = 1; i <= n; i++) {
        sum += K * i;
        for(int s1 = 0; s1 < i; s1++) {
            int ways = 0;
            for(int s = s1; s <= sum; s += i) {
                ways += dp[i-1][s];
                if(ways >= mod) ways -= mod;
                if(s-(K+1)*i >= 0) {
                    ways -= dp[i-1][s-(K+1)*i];
                    if(ways < 0) ways += mod;
                }
                dp[i][s] = ways;
//                debug(), dbg(i), dbg(s), dbg(dp[i][s]);
            }
        }
    }
    for(int avg = 1; avg <= n; avg++) {
        int ways = 0;
        for(int s = 0; s <= sum; s++) {
            ways += 1ll*dp[avg-1][s]*dp[n-avg][s]%mod;
            if(ways >= mod) ways -= mod;
        }
        ways = 1ll*ways*(K+1)%mod;
        ways--;
        if(ways < 0) ways += mod;
        cout << ways << "\n";
    }
}




#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#include "/debug.h"
#else
#define db(...)
#endif

#define all(v) v.begin(), v.end()
#define pb push_back
using ll = long long;
const int NAX = 2e5 + 5, MOD = 1000000007;

ll dp_mask[1 << 16][17][17];

int64_t solveCase(int64_t H, int64_t W, int64_t A, int64_t B)
{
    // TODO: edit here
    memset(dp_mask, -1, sizeof dp_mask);
    function<ll(int, int, int)> solve = [&](int mask, int a, int b) -> ll {
        if (a < 0 || b < 0)
            return 0;
        int cnt = __builtin_popcount(mask);
        if (cnt == H * W)
        {
            auto ret = a == 0 && b == 0;
            db("basecase", bitset<16>(mask), a, b, ret, cnt);
            return ret;
        }
        auto &ret = dp_mask[mask][a][b];
        if (ret >= 0)
            return ret;
        ret = 0;
        for (int i = 0; i < H; i++)
        {
            for (int j = 0; j < W; j++)
            {
                int curr = i * W + j;
                if ((mask >> curr) & 1)
                {
                }
                else
                {
                    ret += solve(mask | (1 << curr), a - 1, b);
                    if (i + 1 < H)
                    {
                        int curr2 = (i + 1) * W + j;
                        if (mask & (1 << curr2))
                            ;
                        else
                            ret += solve(mask | (1 << curr) | (1 << curr2), a, b - 1);
                    }
                    if (j + 1 < W)
                    {
                        int curr2 = i * W + j + 1;
                        if (mask & (1 << curr2))
                            ;
                        else
                            ret += solve(mask | (1 << curr) | (1 << curr2), a, b - 1);
                    }
                    db("midloop", bitset<16>(mask), a, b, ret, cnt);
                    return ret;
                }
            }
        }
        db("endloop", bitset<16>(mask), a, b, ret, cnt);
        return ret;
    };
    return solve(0, B, A);
}

// generated by oj-template v4.7.2 (https://github.com/online-judge-tools/template-generator)
int main()
{
#ifndef LOCAL
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
#endif
    constexpr char endl = '\n';
    int64_t H, W, A, B;
    cin >> H >> W >> A >> B;
    auto ans = solveCase(H, W, A, B);
    cout << ans << endl;
    return 0;
}