#[allow(unused_imports)]
use proconio::{fastout, input, marker::Chars, marker::Usize1};

pub mod fp {

    use std::convert::From;
    use std::iter;
    use std::ops;

    const P: u32 = 998244353;

    #[derive(Copy, Clone, Debug)]
    pub struct Fp(pub u32);

    impl Fp {
        pub fn pow(mut self, mut exp: u32) -> Fp {
            let mut res = Fp(1);
            while exp != 0 {
                if exp % 2 != 0 {
                    res *= self;
                }
                self *= self;
                exp /= 2;
            }
            res
        }
    }

    impl From<i64> for Fp {
        fn from(mut x: i64) -> Fp {
            x %= P as i64;
            if x < 0 {
                x += P as i64;
            }
            Fp(x as u32)
        }
    }

    impl iter::Product for Fp {
        fn product<I>(iter: I) -> Fp
        where
            I: Iterator<Item = Fp>,
        {
            iter.fold(Fp(1), |b, i| b * i)
        }
    }

    impl iter::Sum for Fp {
        fn sum<I>(iter: I) -> Fp
        where
            I: Iterator<Item = Fp>,
        {
            iter.fold(Fp(0), |b, i| b + i)
        }
    }

    impl ops::Add<Fp> for Fp {
        type Output = Fp;
        fn add(mut self, rhs: Fp) -> Fp {
            self += rhs;
            self
        }
    }

    impl ops::AddAssign<Fp> for Fp {
        fn add_assign(&mut self, rhs: Fp) {
            self.0 += rhs.0;
            if self.0 >= P {
                self.0 -= P;
            }
        }
    }

    impl ops::Div for Fp {
        type Output = Fp;
        fn div(mut self, rhs: Fp) -> Fp {
            self /= rhs;
            self
        }
    }

    impl ops::DivAssign for Fp {
        fn div_assign(&mut self, rhs: Fp) {
            *self *= rhs.pow(P - 2);
        }
    }

    impl ops::Mul<Fp> for Fp {
        type Output = Fp;
        fn mul(mut self, rhs: Fp) -> Fp {
            self *= rhs;
            self
        }
    }

    impl ops::MulAssign<Fp> for Fp {
        fn mul_assign(&mut self, rhs: Fp) {
            self.0 = (self.0 as u64 * rhs.0 as u64 % P as u64) as u32;
        }
    }

    impl ops::Neg for Fp {
        type Output = Fp;
        fn neg(self) -> Fp {
            Fp(match self.0 {
                0 => 0,
                s => P - s,
            })
        }
    }

    impl ops::Sub<Fp> for Fp {
        type Output = Fp;
        fn sub(mut self, rhs: Fp) -> Fp {
            self -= rhs;
            self
        }
    }

    impl ops::SubAssign<Fp> for Fp {
        fn sub_assign(&mut self, rhs: Fp) {
            if self.0 < rhs.0 {
                self.0 += P;
            }
            self.0 -= rhs.0;
        }
    }
}

use fp::Fp;

#[fastout]
fn main() {
    input! {
        n: usize,
        m: usize,
        k: usize,
    }
    let mut fact = vec![Fp(0); n];
    fact[0] = Fp(1);
    for i in 1..n {
        fact[i] = fact[i - 1] * Fp(i as u32);
    }
    let mut ifact = vec![Fp(0); n];
    ifact[n - 1] = Fp(1) / fact[n - 1];
    for i in (1..n).rev() {
        ifact[i - 1] = ifact[i] * Fp(i as u32);
    }

    let binom = |n, r| fact[n] * ifact[r] * ifact[n - r];

    println!(
        "{}",
        (Fp(m as u32)
            * (0..=k)
                .map(|i| Fp(m as u32 - 1).pow((n - 1 - i) as u32) * binom(n - 1, i))
                .sum())
        .0
    );
}


Measured memory_bytes: 3556