#include <bits/stdc++.h>

using namespace std;

int M;

#warning not checked
template <class T, class I = long long>
struct modint {
    T x;

    modint() : x() {}
    modint(T s) {
        x = s % M;
        if (x < 0) x += M;
    }

    explicit operator T() const { return x; }

    modint operator+() const { return *this; }
    modint operator-() const { return T(-x); }

    modint inv() {
        T a = x, b = M, as = 1, bs = 0;
        while (b) {
            T d = a / b;
            tie(a, b) = make_pair(b, a - b * d);
            tie(as, bs) = make_pair(bs, as - bs * d);
        }
        assert(a == 1);
        return as;
    }

    modint& operator+=(const modint &o) {
        x = x + o.x >= M ? x + o.x - M : x + o.x;
        return *this;
    }

    friend modint operator+(const modint &s, const modint &t) {
        return modint(s) += t;
    }

    modint& operator-=(const modint &o) {
        x = x - o.x < 0 ? x - o.x + M : x - o.x;
        return *this;
    }

    friend modint operator-(const modint &s, const modint &t) {
        return modint(s) -= t;
    }

    modint& operator*=(const modint &o) {
        x = I(x) * o.x % M;
        return *this;
    }

    friend modint operator*(const modint &s, const modint &t) {
        return modint(s) *= t;
    }

    modint& operator/=(const modint &o) {
        return *this = *this * o.inv();
    }

    friend modint operator/(const modint &s, const modint &t) {
        return modint(s) /= t;
    }

    modint& operator^=(I e) {
        T b = x;
        for (x = 1; e; e >>= 1, b = I(b) * b % M) {
            if (e & 1) x = I(x) * b % M;
        }
        return *this;
    }

    modint operator^(I e) {
        return modint(*this) ^= e;
    }

    // streams

    friend istream& operator>>(istream &is, modint &t) {
        T p;
        is >> p;
        t = modint(p);
        return is;
    }

    friend ostream& operator<<(ostream &os, const modint &t) {
        return os << t.x;
    }
};
using mint = modint<int>;

const int N = 100, S = 500000;
mint dp[N][S];

int main() {
    ios::sync_with_stdio(0), cin.tie(0);

    int n, k;
    cin >> n >> k >> M;

    dp[0][0] = 1;
    for (int i = 1; i < n; i++) {
        vector<mint> a(i);
        for (int v = 0, r = 0; v < S; v++, r = r == i - 1 ? 0 : r + 1) {
            dp[i][v] = dp[i - 1][v] + a[r];

            if (int u = v; u >= 0) {
                a[r] = a[r] + dp[i - 1][u];
            }
            if (int u = v - i * k; u >= 0) {
                a[r] = a[r] - dp[i - 1][u];
            }
        }
    }

    for (int i = 0; i < n; i++) {
        mint ans = 0;
        for (int j = 0; j < S; j++) {
            ans += dp[i][j] * dp[n - i - 1][j];
        }
        ans = ans * (k + 1) - 1;

        cout << ans << '\n';
    }
}


#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <cassert>

#define rep(i, n) for(int i = 0; i < n; i++)
#define per(i, n) for(int i = n - 1; i >= 0; i--)
using ll = long long;
#define vi vector<int>
#define vvi vector<vi>
#define vl vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
using namespace std;

constexpr int h = 30, w = 30;
constexpr bool istest = false;

void answer_query(){
	int sy,sx, ty,tx;
	cin >> sy >> sx >> ty >> tx;
	if(istest){
		double a,b;
		cin >> a >> b;
	}
	if(sy < ty){
		for(int i = sy; i < ty; i++){
			cout << "D";
		}
	}
	else{
		for(int i = ty; i < sy; i++){
			cout << "U";
		}
	}

	if(sx < tx){
		for(int i = sx; i < tx; i++){
			cout << "R";
		}
	}
	else{
		for(int i = tx; i < sx; i++){
			cout << "L";
		}
	}
	cout << endl;
	
	if(!istest){
		int a; cin >> a;
	}
}
int main(){
	if(istest){
		vvi val_width(h, vi(w - 1));
		vvi val_height(h - 1, vi(w));
		rep(i, h) rep(j, w - 1) cin >> val_width[i][j];
		rep(i, h - 1) rep(j, w) cin >> val_height[i][j];
	}
	rep(i, 1000){
		answer_query();
	}
}