#pragma GCC optimize ("Ofast,unroll-loops")
#pragma GCC optimize("no-stack-protector,fast-math")

#include <bits/stdc++.h>

using namespace std;

constexpr int N = 2e6+7;
constexpr int M = 998244353;

#define fastio ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define int long long
#define pii pair<int, int>
#define fi first
#define se second
#define SZ(x) ((int)(x.size()))

#ifdef int
#define INF 0x3f3f3f3f3f3f3f3f
#define INF2 (int)(0xcfcfcfcfcfcfcfcf)
#else
#define INF 0x3f3f3f3f
#define INF2 0xcfcfcfcf
#endif



signed main() {
    fastio
    int a, b, c;
    cin >> a>> b >> c;
    cout << (a*(a+1)/2 % M) * (b*(b+1)/2 % M) % M * (c*(c+1)/2 % M) % M << "\n";
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double

int main() {
    ll N, K;
    ll mod;
    cin >> N >> K >> mod;
    
    ll MX = 500000;
    vector<vector<ll>> dp(N, vector<ll>(MX, 0));
    dp[0][0] = 1;
    for (int i = 1; i < N; i++) {
        for (int j = 0; j < i; j++) {
            ll summand = 0;
            for (int k = j; k < MX; k += i) {
                summand += dp[i-1][k];
                if (k >= (K+1)*i) summand += mod-dp[i-1][k-(K+1)*i];
                while (summand >= mod) summand -= mod;
                dp[i][k] = summand;
            }
        }
    }
    for (int i = 1; i <= N; i++) {
        ll ans = 0;
        for (int j = 0; j < MX; j++) {
            ans += dp[i-1][j]*dp[N-i][j]%mod*(K+1)%mod;
        }
        ans -= 1;
        ans %= mod;
        cout << ans << endl;
    }
    return 0;
}