Buggy python submission (verdict: Time Limit Exceeded):
import math


# class Comb:
#     m_vals = []
#     _mod = 998244353
#
#     def __init__(self, n: int, r: int):
#         m_ls = [(0, 1)] * (r + 1)
#         for i in range(1, r):
#             x = (m_ls[i - 1][0] * self._mod + m_ls[i - 1][1]) * (n - r / r)
#             if x >= self._mod:
#                 m_ls[i] = (int(x // self._mod), int(x % self._mod))
#             else:
#                 m_ls[i] = (0, int(x))
#         self.m_vals = m_ls
#
#     def vv(self, x):
#         return self.m_vals[x][1]

def create_array(n: int, r: int, mod, mod2):
    m_ls = [1] * (r + 1)

    for i, j in zip(range(n, 0, -1), range(1, r + 1)):
        m_ls[j] = (m_ls[j - 1] * i * pow(j, mod2, mod)) % mod
    return m_ls


def main():
    n, m, k = map(int, input().split())

    _mod = 998244353
    _mod2 = 998244351

    # res_x = m * ((m-1) ** (n-1-x)) * comb(n-1, x)
    # x:0, 2, ... , k
    # xをk->0とすると(m-1) ** (n-1-x)は少しずつかけていける

    # com = Comb(n - 1, k)
    comb_ar = create_array(n-1, k, _mod, _mod2)
    _z = (m - 1) ** (n - 1 - k)
    res = m * _z * comb_ar[k]
    res %= _mod

    if k > 0:
        for x in range(1, k + 1):
            _z *= m - 1
            res += m * _z * comb_ar[k - x]
            res %= _mod

    # res %= _mod

    print(res)
    #
    #
    #
    # for x in range(1, k+1):
    #     res += m * (_z * (m-1) ** x) * comb(n-1, x)
    #
    # _a_n = ((m - 1) ** (n - 1 - k)) % _mod
    # _b_n = 1
    # _c_n = 1
    # _d_n = 1
    #
    # _a = [_a_n]
    # _b = [_b_n]
    # # _c = [_c_n]
    # _d = [_d_n]
    # for i in range(1, k + 1):
    #     _a_n *= m - 1
    #     _a_n %= _mod
    #     _a.append(_a_n)
    #     _b_n *= n - i
    #     _b_n %= _mod
    #     _b.append(_b_n)
    #     _c_n *= i
    #     _d_n = (_c_n ** (_mod - 2)) % _mod
    #     _d.append(_d_n)
    #
    # _a.reverse()
    #
    # if k == 0:
    #     res = m * ((m - 1) ** (n - 1))
    #     print(res % _mod)
    # else:
    #     res = (m * ((m - 1) ** (n - 1))) % _mod
    #     for i in range(1, k + 1):
    #         res += (m * _a[i - 1] * _b[i - 1] * _d[i - 1]) % _mod
    #
    #     print(res % _mod)
    #
    # # res_k = m * ((m-1) ** (n-1-k)) * comb(n-1,k)
    # #
    # # for i in range(1, k + 1):
    # #     z_c *= (n-i)
    # #     z_p *= i
    # #     z_c %= _mod
    # #     z_p %= _mod
    # #
    # #     if z_c % z_p == 0:
    # #         comb_ls.append(int(z_c/z_p))
    # #     else:
    # #         for j in range(1, n-1):
    # #             _ = z_c + j * _mod
    # #             if _ % z_p == 0:
    # #                 comb_ls.append(int(_/z_p))
    # #
    # #
    # # comb_ls.reverse()
    # # for i in range(1, k + 1):
    # #     j = k + 1 - i
    # #
    # #     z_before *= (m-1)
    # #     res_x += (m * comb_ls[i-1] * z_before) % 998244353
    # #
    # # print(res_x % _mod)


main()


Fixed submission:
import math


# class Comb:
#     m_vals = []
#     _mod = 998244353
#
#     def __init__(self, n: int, r: int):
#         m_ls = [(0, 1)] * (r + 1)
#         for i in range(1, r):
#             x = (m_ls[i - 1][0] * self._mod + m_ls[i - 1][1]) * (n - r / r)
#             if x >= self._mod:
#                 m_ls[i] = (int(x // self._mod), int(x % self._mod))
#             else:
#                 m_ls[i] = (0, int(x))
#         self.m_vals = m_ls
#
#     def vv(self, x):
#         return self.m_vals[x][1]

def create_array(n: int, r: int, mod, mod2):
    m_ls = [1] * (r + 1)

    for i, j in zip(range(n, 0, -1), range(1, r + 1)):
        m_ls[j] = (m_ls[j - 1] * i * pow(j, mod2, mod)) % mod
    return m_ls


def main():
    n, m, k = map(int, input().split())

    _mod = 998244353
    _mod2 = 998244351

    # res_x = m * ((m-1) ** (n-1-x)) * comb(n-1, x)
    # x:0, 2, ... , k
    # xをk->0とすると(m-1) ** (n-1-x)は少しずつかけていける

    # com = Comb(n - 1, k)
    comb_ar = create_array(n-1, k, _mod, _mod2)
    _z = (m - 1) ** (n - 1 - k)
    res = m * _z * comb_ar[k]
    res %= _mod

    if k > 0:
        for x in range(1, k + 1):
            _z *= m - 1
            _z %= _mod
            res += m * _z * comb_ar[k - x]
            res %= _mod

    # res %= _mod

    print(res)
    #
    #
    #
    # for x in range(1, k+1):
    #     res += m * (_z * (m-1) ** x) * comb(n-1, x)
    #
    # _a_n = ((m - 1) ** (n - 1 - k)) % _mod
    # _b_n = 1
    # _c_n = 1
    # _d_n = 1
    #
    # _a = [_a_n]
    # _b = [_b_n]
    # # _c = [_c_n]
    # _d = [_d_n]
    # for i in range(1, k + 1):
    #     _a_n *= m - 1
    #     _a_n %= _mod
    #     _a.append(_a_n)
    #     _b_n *= n - i
    #     _b_n %= _mod
    #     _b.append(_b_n)
    #     _c_n *= i
    #     _d_n = (_c_n ** (_mod - 2)) % _mod
    #     _d.append(_d_n)
    #
    # _a.reverse()
    #
    # if k == 0:
    #     res = m * ((m - 1) ** (n - 1))
    #     print(res % _mod)
    # else:
    #     res = (m * ((m - 1) ** (n - 1))) % _mod
    #     for i in range(1, k + 1):
    #         res += (m * _a[i - 1] * _b[i - 1] * _d[i - 1]) % _mod
    #
    #     print(res % _mod)
    #
    # # res_k = m * ((m-1) ** (n-1-k)) * comb(n-1,k)
    # #
    # # for i in range(1, k + 1):
    # #     z_c *= (n-i)
    # #     z_p *= i
    # #     z_c %= _mod
    # #     z_p %= _mod
    # #
    # #     if z_c % z_p == 0:
    # #         comb_ls.append(int(z_c/z_p))
    # #     else:
    # #         for j in range(1, n-1):
    # #             _ = z_c + j * _mod
    # #             if _ % z_p == 0:
    # #                 comb_ls.append(int(_/z_p))
    # #
    # #
    # # comb_ls.reverse()
    # # for i in range(1, k + 1):
    # #     j = k + 1 - i
    # #
    # #     z_before *= (m-1)
    # #     res_x += (m * comb_ls[i-1] * z_before) % 998244353
    # #
    # # print(res_x % _mod)


main()