n, m, k = list(map(int, input().split()))

mod = 998244353

ans = 0

x = 1

for i in range(k + 1):

    ans += (((m * pow(m - 1, n - i - 1, mod)) % mod) * x) % mod

    ans %= mod

    x = (x * (n - i - 1) * pow(i + 1, mod - 2, mod)) % mod

print((ans % mod))
mod = 998244353

def comb(n, r):

    if n < r:return 0

    if n < 0 or r < 0:return 0

    return fa[n] * fi[r] % mod * fi[n - r] % mod

n, m, k = list(map(int, input().split()))

fa = [1] * (n + 1)

fi = [1] * (n + 1)

for i in range(1, n + 1):

    fa[i] = fa[i - 1] * i % mod

    fi[i] = pow(fa[i], mod - 2, mod)

ans = 0

for i in range(k + 1):

    ans += pow(m - 1, n - i - 1, mod) % mod * comb(n - 1, i) * m % mod

    ans %= mod

print(ans)
n, m, k = list(map(int, input().split()))
mod = 998244353
ans = 0
x = 1
for i in range(k + 1):
    ans += (((m * pow(m - 1, n - i - 1, mod)) % mod) * x) % mod
    ans %= mod
    x = (x * (n - i - 1) * pow(i + 1, mod - 2, mod)) % mod
print((ans % mod))

mod = 998244353


def comb(n, r):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fa[n] * fi[r] % mod * fi[n - r] % mod


n, m, k = list(map(int, input().split()))
fa = [1] * (n + 1)
fi = [1] * (n + 1)
for i in range(1, n + 1):
    fa[i] = fa[i - 1] * i % mod
    fi[i] = pow(fa[i], mod - 2, mod)
ans = 0
for i in range(k + 1):
    ans += pow(m - 1, n - i - 1, mod) % mod * comb(n - 1, i) * m % mod
    ans %= mod
print(ans)

+mod = 998244353 + + +def comb(n, r): +    if n < r: +        return 0 +    if n < 0 or r < 0: +        return 0 +    return fa[n] * fi[r] % mod * fi[n - r] % mod + + -mod = 998244353 +fa = [1] * (n + 1) +fi = [1] * (n + 1) +for i in range(1, n + 1): +    fa[i] = fa[i - 1] * i % mod +    fi[i] = pow(fa[i], mod - 2, mod) -x = 1 -    ans += (((m * pow(m - 1, n - i - 1, mod)) % mod) * x) % mod +    ans += pow(m - 1, n - i - 1, mod) % mod * comb(n - 1, i) * m % mod -    x = (x * (n - i - 1) * pow(i + 1, mod - 2, mod)) % mod -print((ans % mod)) +print(ans)