/*
AtCoderBeginnerContest167
Problem E - Colorful Blocks /
Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 500 points
*/

#include <iostream>
#include <vector>

//Makes use of algorithm I didn't know before for finding inverse of n mod p using resursion on n

//Answer is SUM_{x=0}^K Num(N, M, x)
//where Num(N, M, x) is the number of ways to have exactly x pairs of consecutive blocks with same color.
//
//To calculate Num(N, M, x), first note that there are (N-1)_Choose_x ways to choose the locations of the
//color repeats.  Once those x locations are chosen, the remaining N-x blocks are colored so that there are
//no repeats ==> M choices for first block, and (M-1) choices for each of the remaining (N-x-1) blocks.
//
//Thus Answer = SUM_{x=0}^K M * (N-1)_Choose_x * (M-1)^(N-x-1)
//            = M * SUM_{x=0}^K (N-1)_Choose_x * (M-1)^(N-x-1)
//
// NOTE that this summation takes a simple form in case K = N-1; namely, [1 + (M-1)]^(N-1) = M^(N-1),
// which gives an answer of M^N as expected since this case has no constraint on consecutive colors.
//
//OK, these calculations are trivially doable in short time were it not for the fact that the numbers
//get too big and we need to reduce module MODULUS.  The form of (N-1)_Choose_x (mod MODULUS) is a bit
//tricky in that although the exact for is (N-1)!/[x! * (N-1-x)!], and each of the components is calculable
//in reasonable time, in general inverse mod MODULUS is not known and has not simple closed form.
//
//Key then is to figure out how to find the inverse of x! (mod MODULUS) and the invers of (N-1-x)! (mod MODULUS)
//It turns out that (n!)^(-1) (mod MODULUS) can be calculated using recursion and the simple starting
//condition that (1!)^(-1) = 1 (mod MODULUS).  Inverses for higher values of n are found by obseving that:
//
// Dividing MODULUS by n always leaves a nonzero remainder since MODULUS is prime and 2 <= n < MODULUS.
// Thus, the integer quotient MODULUS/n, when multiplied by n is simply MODULUS - remainder.
// Hence, n* [-MODULUS/n] is congruent to remainder (mod MODULUS).
//
// Most computer languages give an inconvenient behavior when doing modular arithmetic involving
// negative numbers; so, instead of -MODULUS/n, use z = MODULUS - (MODULUS/n), which still has the nice
// property that n*z is congruent to remainder (mod MODULUS). Thus, if y is (remainder)^(-1) (mod MODULUS),
// then n*y*z is congruent to 1 ==> y*z is the desired inverse of n (mod MODULUS).
//
// Since remainder is just the (MODULUS%n), it has a value less than n ==> we've already calculated that
// inverse in a previous step!

long MODULUS = 998244353;

long plus(long x, long y)
{
    long res = x+y;
    res %= MODULUS;
    return res;
}

long mult(long x, long y)
{
    long res = x*y;
    res %= MODULUS;
    return res;
}

std::vector<long> pow;
std::vector<long> fact;
std::vector<long> inv;
std::vector<long> inv_fact;

void nextPow(int i, int M)
{
    pow.push_back(mult(pow[i-1], M-1));
}

void nextFact(int i)
{
    long last = fact[i-1];
    fact.push_back(mult(last, i));
}

void nextInv(int i)
{
    int rem = MODULUS%i;
    long y = inv[rem];
    long z = MODULUS - (MODULUS/i);
    inv.push_back(mult(y,z));
}

void nextInvFact(int i)
{
    inv_fact.push_back(mult(inv_fact[i-1], inv[i]));
}

long Choose(int A, int B)
{
    long res = fact[A];
    res = mult(res, inv_fact[B]);
    res = mult(res, inv_fact[A-B]);
    return res;
}

int main()
{
    int N, M, K;
    std::cin >> N >> M >> K;

    pow.push_back(1);
    fact.push_back(1);
    inv.push_back(-1);
    inv_fact.push_back(1);

    nextPow(1, M);
    fact.push_back(1);
    inv.push_back(1);
    inv_fact.push_back(1);

    for (int i=2; i<N; i++)
    {
        nextPow(i, M);
        nextFact(i);
        nextInv(i);
        nextInvFact(i);
    }

    long res = 0;
    for (int x=0; x<=K; x++)
    {
        long term = mult(Choose(N-1, x), pow[N-x-1]);
        res = plus(res, term);
    }
    res = mult(res, M);
    std::cout << res << "\n";
}


Measured memory_bytes: 9676