#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<math.h>
#include<map>
#include<string>
#define ll long long
#define inf 0x3f3f3f3f
using namespace std;

ll n,m,k;
ll p=998244353;
ll C[2222][2222];///C[i][j]表示从i个里拿j个
void init()
{
    memset(C,0,sizeof(C));
    for(int i=0;i<2222;i++)
        C[i][0]=C[i][i]=1;
    for(int i=1;i<2222;i++)
        for(int j=1;j<i;j++)
        C[i][j]=(C[i-1][j-1]+C[i-1][j])%p;///组合恒等式
    /*
    for(int i=0;i<=10;i++)
    {
        for(int j=0;j<=i;j++)
            printf("%5lld",C[i][j]);
        printf("\n");
    }*/
}

int main()
{
    init();
    while(scanf("%lld %lld %lld",&n,&m,&k)!=EOF)
    {
        ll ans=m*C[n-1][k]%p;
        for(int i=1;i<=k;i++)
            ans=ans*(m-1)%p;
        printf("%lld\n",ans);
    }
    return 0;
}

#include <bits/stdc++.h>
#include <algorithm>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define MAX 100007
#define mm 998244353
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
using namespace __gnu_pbds;
typedef unsigned long long int ll;
#define ordered_set tree<int>,null_type,less<int>, rb_tree_tag, tree_order_statistics_node_update>
ll dp[2005][2005];
ll arr[100005];
ll n,m,k;

ll solve(ll i,ll sum)
{
	ll j,flag=0;
	if(sum==k)
		return 1;
	if(i==n+1)
		return 0;
	if(dp[i][sum]!=-1)
		return dp[i][sum];
	ll ans=solve(i+1,sum)%mm;
	ll a=solve(i+1,sum+1)%mm;
	ans=(ans+(a*(m-1))%mm)%mm;
	dp[i][sum]=ans%mm;
	return ans%mm;
}

int main()
{
	boost
	cin>>n>>m>>k;
	memset(dp,-1,sizeof(dp));
	ll c=solve(2,0);
	cout<<(c*m)%mm<<"\n";
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long         ll;
typedef vector<int>       vi;
typedef vector<ll>        vl;
typedef pair<int, int>    pii;
typedef pair<ll, ll>      pll;

#define read        freopen("in.txt", "r", stdin)
#define write       freopen("out.txt", "w", stdout)
#define all(a)      a.begin(), a.end()
#define mp          make_pair
#define ff          first
#define ss          second
#define pb          push_back
#define eps         1e-9
#define inf         (1000000000)
#define infl        (1000000000000000000LL)
#define cs(p)       printf("Case %d:", (p)++)
#define SET(a)      memset((a), -1, sizeof(a))
#define CLR(a)      memset((a), 0, sizeof(a))
#define dbg(x)      cout << #x << " = " << x << endl

const ll MOD = 998244353;

ll C[2003][2003];

void binomialCoeff(ll n, ll k)
{
    ll i, j;

    for (i = 0; i <= n; i++)
    {
        for (j = 0; j <= min(i, k); j++)
        {
            if (j == 0 || j == i)
                C[i][j] = 1;
            else
                C[i][j] = C[i-1][j-1] + C[i-1][j];
            C[i][j] %= MOD;
        }
    }
}

int main()
{
    //read; write;
    ll n, m, k;
    cin >> n >> m >> k;
    binomialCoeff(n - 1, k);
    ll ans = 1;
    ans *= C[n-1][k];
    ans %= MOD;
    ans *= m;
    ans %= MOD;

    for(ll i = 1; i <= k; i++)
        ans *= m-1, ans %= MOD;

    cout << ans;
}

#define ioFix ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);

long long madd(long long x, long long y, long long modulo) {
  return (x + y) % modulo;
}

long long mmult(long long x, long long y, long long modulo) {
  return (x * y) % modulo;
}

long long mpow(long long base, long long exponent, long long modulo) {
  long long res = 1;
  for(int i = 0; i < exponent; i++)
    res = (res * base) % modulo;
  return res;
}

long long mfac(long long n, long long modulo) {
  long long res = 1;
  for(int i = 2; i <= n; i++)
    res = (res * i) % modulo;
  return res;
}

#include <bits/stdc++.h>
using namespace std;

// Slower, DP approach
long long mcombDP(long long n, long long k, long long modulo) {
  long long C[k+1];
  memset(C, 0, sizeof(C));
  C[0] = 1;

  for(long long i = 1; i <= n; i++)
    for(long long j = min(i, k); j > 0; j--)
      C[j] = (C[j] + C[j - 1]) % modulo;
  return C[k];
}

// Lucas theorem
long long mcomb(long long n, long long k, long long modulo) {
  if(k == 0)
    return 1;

  return (
    mcomb(n / modulo, k / modulo, modulo) *
    mcombDP(n % modulo, k % modulo, modulo)
  ) % modulo;
}

#define PI (2.0 * acos(0.0))
#define INF (int)1e9
#define LINF (long long)1e18
#define EPS 1e-9

#define ll long long
#define ull unsigned long long

#define pii pair<int, int>
#define pll pair<long long, long long>
#define pdd pair<double, double>
#define pcc pair<char, char>
#define pbb pair<bool, bool>

#define vi vector<int>
#define vvi vector<vector<int>>
#define vd vector<double>
#define vvd vector<vector<double>>
#define vc vector<char>
#define vvc vector<vector<char>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
#define vs vector<string>
#define vvs vector<vector<string>>

#define REP(n) for(int xix = 0; xix < (n); xix++)
#define FOR(i, from, to) for(int (i) = from; (i) < (to); (i)++)
#define RANGE(i, from, to) for(int (i) = from; (i) <= (to); (i)++)
#define ALL(x) x.begin(),x.end()

#define pb push_back
#define mp make_pair
#define mt make_tuple

#define fillArray(arr, val) std::fill(std::begin(arr), std::end(arr), (val))

#define pow2(x) ((x)*(x))
#define mod(x, m) ((((x) % (m)) + (m)) % (m))
#define max3(a, b, c) max(a, max(b, c))
#define min3(a, b, c) min(a, min(b, c))

#define watch(x) cout << (#x) << " is " << (x) << endl
#define watchVector(v) { for(int xvx = 0; xvx < (v).size(); xvx++) { cout << (v)[xvx] << " "; } cout << endl; }
#define watchArray(arr, n) { for(int xax = 0; xax < (n); xax++) { cout << (arr)[xax] << " "; } cout << endl; }
#define watchMatrix(x, rows, cols) for(int r = 0; r < (rows); r++) { for(int c = 0; c < (cols); c++) { cout << (x)[r][c] << " "; } cout << endl; }

int main() {
  ioFix;
  ll MOD = 998244353;
  ll N, M, K;
  cin >> N >> M >> K;

  // Stars and bars
  ll res = mmult(mcombDP(N-1, K, MOD), mmult(M, mpow(M-1, K, MOD), MOD), MOD);
  cout << res << endl;
}

#include<bits/stdc++.h>
#define IOS {ios :: sync_with_stdio(false); cin.tie(0); }
using namespace std;
typedef long long ll;
typedef long double ld;
#define F first
#define S second
#define pb push_back
const ll md=998244353;

ll dp[2003][2003];

int main(){
	IOS;;
    ll n,m,i,j,k,p,q;
    cin>>n>>m>>k;

    if(n==1){
        if(k==0) cout<<m<<"\n";
        else cout<<"0\n";
        return 0;
    }
    for(i=1;i<=n;i++) dp[i][0]=m;
    for(i=2;i<=n;i++){
        for(j=1;j<=i-1;j++){
            dp[i][j]= (  dp[i-1][j]  %md + dp[i-1][j-1]*(m-1)) %md;
        }
    }
    // for(i=0;i<=n;i++) {{for(j=0;j<=k;j++) cout<<dp[i][j]<<" ";} cout<<"\n";}
    cout<<dp[n][k]<<"\n";

}

#include<bits/stdc++.h>
using namespace std;
#define int long long
int p=998244353;
int f[3001][3001];
signed main()
{
	int n,m,k;
	cin>>n>>m>>k;
	for(register int i=1;i<=n;i++)
	{
		f[i][0]=m;
		for(register int j=1;j<min(k+1,i);j++)
		{
			f[i][j]=f[i-1][j-1]*(m-1)%p+f[i-1][j]%p;
		}
	}
	cout<<f[n][k]%p;
}

#include <bits/stdc++.h>
/*
IDEA:The bricks should be partitioned to k-parts with all the bricks in the same partition should have the
same colour
Number of such partitions=(n-1)Ck
for each partition number of colour combinations = m*pow(m-1,k-1)
*/
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main(){
IOS;
long mod=998244353;
vector<vector<long long>>dp(2001,vector<long long>(2001));
for(int i=0;i<2001;i++){
    dp[i][0]=1;
    for(int j=1;j<=i;j++){
        dp[i][j]=(dp[i-1][j-1]+dp[i-1][j])%mod;
    }
}

int n,m,k;
cin>>n>>m>>k;
if(k==0){
    cout<<m;
    return 0;
}
long long result=dp[n-1][k];
result=(result*m)%mod;
for(int i=0;i<k;i++){
    result=(result*(m-1))%mod;
}
//result=(result*k)%mod;
cout<<result;
return 0;
}

#include <bits/stdc++.h>

using namespace std;

int MOD = 998244353;
int dp[2001][2001];

int f(int n, int k) {
    if(dp[n][k] != -1) return dp[n][k];
    if(k > n) return 0;
    if(k == 0) return 1;

    dp[n][k] = ( f(n-1, k-1) + f(n-1, k) ) % MOD;

    return dp[n][k];
}

int main () {
	int n, m, k;
	cin >> n >> m >>k;

	memset(dp, -1, sizeof(dp));

	int ans = f(n-1,k) * (long long)m % MOD;

	for(int i = 0; i < k; i++)
		ans = ans * (long long)(m-1) % MOD;

	cout << ans;
}

#include <bits/stdc++.h>
using namespace std;
const char NL = '\n';
#define PI 3.14159265
#define test int t;cin >> t;while (t--)
#define all(a) a.begin(), a.end()
#define int long long
int mod = 1000000007;
void read(vector<int> &a);

int ncr(int n, int r)
{
    if(n-r < r)
        r = n-r;

    vector<int> c(r+1,0);
    c[0] = 1;
    for(int i = 1; i <= n; i++)
    {
        for(int j = min(i,r); j > 0; j--)
        {
            c[j] = (c[j]+c[j-1])%mod;
        }
    }
    return c[r];
}

inline void solve()
{
    // all the code goes here
    mod = 998244353;
    int n,m,k;cin>>n>>m>>k;
    int ans = ncr(n-1,k);
    int ite = k;
    while(ite > 0)
    {
        ans*=(m-1);
        ans%=mod;
        ite--;
    }
    ans = (ans*m)%mod;
    cout<<ans<<NL;
}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    solve();
    fflush(stdin);
    fflush(stdout);
    return 0;
}

void read(vector<int> &a)
{
    for(auto &it : a)cin>>it;
}

#include <bits/stdc++.h>

using namespace std;

const int mod = 998244353;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m, k;
  cin >> n >> m >> k;
  int dp[n + 1][k + 2];
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= k + 1; ++j) {
      dp[i][j] = 0;
    }
  }
  dp[1][1] = m;
  for (int i = 2; i <= n; ++i) {
    for (int j = 1; j <= k + 1; ++j) {
      dp[i][j] = dp[i - 1][j] + (1LL * dp[i - 1][j - 1] * (m - 1)) % mod;
      dp[i][j] %= mod;
    }
  }
  cout << dp[n][k + 1] << '\n';
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define loop(i,a,b) for(int i=a;i<b;i++)
#define pb push_back
#define mp make_pair
#define ft first
#define sd second
typedef long long ll;
ll num[2005][2005],val;
ll mod = 998244353;
int main()
{
	ll n,m,k;
	cin >> n >> m >> k;
	//memset(num,1,sizeof(num));
	loop(i,0,n+1)
	{
		loop(j,0,k+1)
		{
			if(j==0)
				num[i][j] = 1;
			else if(i<j)
				num[i][j] = 0;
			else if(i==j)
				num[i][j] = 1;
			else
				num[i][j] = (num[i-1][j-1]+num[i-1][j])%mod;
		}
	}
	ll r = 1;
	ll x = m-1;
	for(int num1=k;num1>0;num1=num1/2)
	{
		if(num1&1)
			r = ((r%mod)*(x%mod))%mod;
		x = ((x%mod)*(x%mod))%mod;
	}
	//cout << num[n-1][k] << " " << m << " " << r << "\n";
	val = (((num[n-1][k]*m)%mod)*(r%mod))%mod;
	cout << val << "\n";
	return 0;

}

/*
 * socode.online
 *
 * Author: 刘兆宇
 * E-mail: 781050469@qq.com
 * Time  : 2020-07-21 09:19:06
 */
#include<bits/stdc++.h>
using namespace std;

const int mod =  998244353;
const int maxn = 2005;

int dp[maxn][maxn];

int main() {
    int n,m,k;
    cin >> n >> m >> k;
    dp[1][0] = m;

    for(int i=2;i<=n;i++) {
        for(int j=0;j<=k;j++) {
            dp[i][j] = dp[i-1][j];
            if(j != 0) dp[i][j] = (dp[i][j] + 1LL * dp[i-1][j-1] * (m - 1)) % mod;
        }
    }
    cout << dp[n][k] << endl;
    return 0;
}

#include <bits/stdc++.h>
#define MOD int(998244353)
using namespace std;
long long dp[2001][2001];
long long n, m, k;
int calc(long long indx, long long num)
{
    if(indx == n && num == k)return 1;
    if(indx == n) return 0;
    long long  ans = 0, &res = dp[indx][num];
    if(~res)return res;
    if(indx == 0)
    {
        ans = (m % MOD * (ans % MOD + calc(indx + 1, num) % MOD) % MOD) % MOD;
    }
    else
    {
        ans = ((m - 1) % MOD * (ans % MOD + calc(indx + 1, num + 1) % MOD) % MOD) % MOD;
        ans = (ans % MOD + calc(indx + 1, num ) % MOD) % MOD;
    }
    return res = ans % MOD;

}
int main()
{
    //Parparosa
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    memset(dp, -1, sizeof dp);
    cin >> n >> m >> k;
    cout << calc(0, 0) % MOD << endl;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef long double ld;

ll inv(ll a, ll b){
    return (a > 1 ? b - inv(b%a, a)*b/a : 1);
}

#define rc(s) return cout << s, 0
#define fi first
#define se second
#define L (nod << 1)
#define R (L | 1)

const ld e = 2.71828182845904523536028747;
const ld PI = 3.14159265359;
const ll inf = (1LL<<62);
const int iinf = (1<<30);
const int mod = 998244353;
const int N = 2010;

ll n, m, k, a = 1, c = 1, d = 1;

int main(){
    cin >> n >> m >> k;
    if (k >= n) rc(0);
    if (n == 1 && !k) rc(m);
    for (int i=1; i<=k; i++) a = (a * (m-1))%mod;
    a = (a * m)%mod;
    ll x = n - k - 1, y = k + 1;
    for (int i=max(x, y-1) + 1; i<=x+y-1; i++) c = (c * i)%mod;
    for (int i=1; i<=min(x, y-1); i++) d = (d * i)%mod;
    d = inv(d, mod); c = (c*d)%mod;
    cout << (a*c)%mod;
    return 0;
}

/*input
3 1 0
*/

//assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z) is(65-90) and 32 for space
#include<bits/stdc++.h>
using namespace std;
#define ll          long long
#define pb          push_back
#define	endl		'\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define is_empty(v) v.empty()
#define vs			vector< string >
#define vvi			vector< vector< ll,ll > >
#define all(it,a)   for(auto it=(a).begin();it!=(a).end();it++)
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define inf         1000000007
#define rep(i,a,b)	for(ll int i=a;i<b;i++)
#define repr(i,a,b) for(ll int i=a;i>b;i--)
#define reprr(i,a,b) for(ll int i=a;i>=b;i--)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define sum(v)      accumulate(v.begin(),v.end(),(ll)0)
//map <long long int,long long int> ma;
//set <long long int, greater <long long int> > s;

ll mo=998244353;
// function to find ncr in O(n*r)
ll ncr(ll n,ll r,ll mod)
{
	ll C[r+1] ={0};
	C[0]=1;
	rep(i,1,n+1)
	{
		repr(j,min(i,r),0)
		{
			C[j] = (C[j-1]%mod+C[j]%mod)%mod;
		}
	}

	return C[r];
}
ll nCrModpLucas(ll n, ll r, ll p)
{

   if (r==0)
      return 1;

   ll ni = n%p, ri = r%p;

   return ((nCrModpLucas(n/p, r/p, p)%p)*(ncr(ni, ri, p)%p)) % p;
}

// function to find (x^y)%mod
ll power(ll x,ll y,ll mod)
{
	if(x==1 || x==0)
		return x;
	if(y==1)
		return x%mod;
     if(y==0)
		return 1%mod;
	if(y%2==0)
		return power(((x%mod)*(x%mod))%mod,y/2,mod);
	else
		return ((x%mod)*power(((x%mod)*(x%mod))%mod,(y-1)/2,mod))%mod;

}

int solve()
{
	ll n,k,m;cin>>n>>m>>k;
	ll ans = (((nCrModpLucas(n-1,k,mo)*(m%mo))%mo)*power(m-1,k,mo))%mo;
	if(m==1 && k==0)
		ans=1;
	cout<<ans;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	ll t=1;
	//cin>>t;
	while(t--)
		solve();
}

#include<stdio.h>
#include<math.h>
/*long long fact(long long n)
  {
  if(n>0)
  return n*fact(n-1);
  else
  return 1;
  }*/
long long   pascal(long long n,long long m,long long mod  )
{
	long long  P[n+1],i,j;
	for(i=0;i<=n;i++)
	{
		for(j=i;j>=0;j--)

		{
			if(j==0 || j==i)
			{
				P[j]=1%mod;
				if(j==m && i==n)
					break;
			}

			else
			{
				P[j]=(P[j-1]+P[j])%mod;
				if(j==m && i==n)
					break;
			}

		}
		if(j==m && i==n)
			break;

	}
	return P[j];

}
int main()
{
//	int T;
//	scanf("%d",&T);

		long long  m,n,k,mod=998244353, ans;
		scanf("%lld %lld %lld",&n,&m,&k);
		if(m==1 && k==1)
			ans=0;
		else
			ans=pascal(n-1,k,mod);
		ans=((ans%mod)*(m%mod))%mod;
		if(m!=1)
		{

		for(int i=1;i<=k;i++)
		{
			ans*=(m-1);
			ans%=mod;
		}}
		printf("%lld\n",ans);

}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int M=1e5+10;
const ll MOD=998244353;
ll ans;
ll a[2050][2050];
ll ksm(ll aa,ll k)
{
	ll ans=1;
	while(k)
	{
		if(k&1)
		{
			ans=(ans*aa)%MOD;
		}
		k/=2;
		aa=(aa*aa)%MOD;
	}
	return ans;
}
int main()
{
	ll n,m,x,s;
	scanf("%lld%lld%lld",&n,&m,&x);
	a[0][0]=a[1][0]=1;
	for(int i=1;i<2010;i++)
	{
		a[i][0]=1;
		for(int j=1;j<2010;j++)
		{
			a[i][j]=(a[i-1][j-1]+a[i-1][j])%MOD;
		}
	}
	cout<<(a[n-1][x]*m)%MOD*ksm(m-1,x)%MOD<<endl;
 }

#include <bits/stdc++.h>

using namespace std;
long long n,k,m;
long long dp[2000 + 10][2000 + 10];
const long long M = 998244353;
int main()
{
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    cin >> n >> m >> k;
    dp[1][1] = m;
    for(int i = 1; i <= n; i ++)
    {
        for(int j = 1; j <= k + 1; j++)
        {

            (dp[i + 1][j] += dp[i][j]) %= M;
            (dp[i + 1][j + 1] += dp[i][j] * (m - 1)) %= M;
        }
    }
    cout << dp[n][k + 1] << "\n";
    return 0;
}

/**
 * File              : C-review-dp.cpp
 * Author            : JCHRYS <jchrys@me.com>
 * Date              : 18.02.2020
 * Last Modified Date: 18.02.2020
 * Last Modified By  : JCHRYS <jchrys@me.com>
 */

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int const mod = 998244353;
int const MAXN = 2001;
ll dp[MAXN][MAXN] {}; // dp[i][j] == #bricks at pos i with total diff cnt j

int main() {
    int n, m, k;
    cin >> n >> m >> k;
    dp[0][0] = m;
    for (int i = 1; i < n; i++) {
        for (int j = 0; j <= k; j++) {
            dp[i][j] = dp[i - 1][j];
            if (j > 0)  {
                dp[i][j] += dp[i - 1][j - 1] * (m - 1);
                dp[i][j] %= mod;
            }
        }
    }
    cout << dp[n-1][k] << '\n';
    return 0;
}

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <math.h>
#include <queue>
#include <string>
#include <string.h>
#include <map>
#include <vector>
#include <fstream>
using namespace std;
#define N 2002
#define M 1001000
//#define MAXN 1125899906842624L
#define MAXVAL 1e15L
#define MAXN 520*520
#define MOD 998244353
int n, m, k;
int dp[2][N];
void solve() {
	int i, j;
	if (m == 1 && k > 0) {
		printf("0\n");
		return;
	}
	//dp[i][j] = dp[i-1][j] + dp[i-1][j-1] * (m-1)
	for (i = 1; i <= n; i++) {
		dp[i%2][0] = m;
		for (j = 1; j < i && j <= k; j++) {
			long long v = dp[(i+1)%2][j-1];
			v *= (long long)(m-1);
			v += dp[(i+1)%2][j];
			v %= MOD;
			dp[i%2][j] = (int)v;
		}
	}
	printf("%d\n", dp[n%2][k]);
}

int main() {
	while(scanf("%d %d %d", &n, &m, &k) != EOF) {
		solve();
	}
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const int MOD = 998244353;

int modpow(int a, int p){
    int ans = 1;
    while(p > 0){
        if(p & 1)
            ans = 1LL * ans * a % MOD;
        a = 1LL * a * a % MOD;
        p >>= 1;
    }
    return ans;
}

long long inv(int n){
    return modpow(n, MOD - 2);
}

ll mult(int a, int b){
    return a * 1ll * b % MOD;
}

ll dp[2001][2001];

int solvedp(){
    int n, m, k; cin >> n >> m >> k;
    dp[1][0] = m;
    for(int i = 1; i <= n; i++){
        for(int j = 0; j <= k; j++){
            dp[i][j] = (dp[i][j] + dp[i - 1][j] % MOD) % MOD;

            if(j > 0)
                dp[i][j] = (dp[i][j] + (dp[i - 1][j - 1] * (m - 1) % MOD) % MOD) % MOD;
        }
    }

    return dp[n][k];
}

void solve(){
    int n, m, k; cin >> n >> m >> k;

    vector<ll> fact(2333, 0);
    fact[0] = 1;
    for(ll i = 1; i <= n; i++){
        fact[i] = fact[i - 1] * (ll)i % MOD;
    }

    // (n - 1)! * inv(k!) * inv(n - 1 - k)!

    ll res = mult(mult(mult(mult(fact[n - 1], inv(fact[k])),inv(fact[n - 1 - k])),m),modpow(m - 1, k));
    cout << res << endl;

}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    cout << solvedp() << endl;

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const int MOD = 998244353;

int modpow(int a, int p){
    int ans = 1;
    while(p > 0){
        if(p & 1)
            ans = 1LL * ans * a % MOD;
        a = 1LL * a * a % MOD;
        p >>= 1;
    }
    return ans;
}

long long inv(int n){
    return modpow(n, MOD - 2);
}

void solve(){
    int n, m, k; cin >> n >> m >> k;

    vector<ll> fact(2333, 0);
    fact[0] = 1;
    for(ll i = 1; i <= n; i++){
        fact[i] = fact[i - 1] * (ll)i % MOD;
    }

    // (n - 1)! * inv(k!) * inv(n - 1 - k)!

    ll res = fact[n - 1] % MOD * inv(fact[k]) % MOD * inv(fact[n - 1 - k]) % MOD * m % MOD * modpow(m - 1, k) % MOD;
    cout << res << endl;

}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    solve();

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>

using namespace __gnu_pbds;
using namespace __gnu_cxx;

#define ff first
#define ss second
//#define vt vector
typedef vector<int> vi;
 typedef vector<vi> vvi;
 typedef vector<pair<int,int> > ii;
 #define pii pair< int,int >
 #define endl "\n"
 #define sz(a) int((a).size())
 #define pb push_back
 #define mkp make_pair
 #define mem(a,b) memset(a,(b),sizeof(a))
 #define rep(i,x,n) for(i=x;i<n;i++)
 #define inp() for(i=0;i<n;i++) cin>>a[i];
 #define all(c) (c).begin(),(c).end()
 #define srt(x) sort(x.begin(),x.end())
 #define tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
 #define present(c,x) ((c).find(x) != (c).end())
 #define cpresent(c,x) (find(along long int(c),x) != (c).end())
 #define mod 1000000007
 const ll LMAX=1000000000000000001;
 const ll MAX= 1000000000;
 const ll MOD=998244353;

/* Special functions:
        find_by_order(k) --> returns iterator to the kth largest element counting from 0
        order_of_key(val) --> returns the number of items in a set that are strictly smaller than our item
*/

typedef tree<
pii(ll,ll),                 // type long long
null_type,
less<pii(ll,ll)>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

// long long int power(long long int x,long long int y){
//     if(y==0){
//         return 1;
//     }
//     if(y%2==0){
//         long long int temp = power(x,y/2);
//         return (temp*temp)%mod;
//     }
//     return (x*power(x,y-1))%mod;
// }
int pop(ll n){
    int ans;
    while(n){
        if(n&1)
            ans++;
        n=n>>1;
    }
    return ans;
}

ll power(ll x,ll y){
    if(y==0){
        return 1;
    }
    if(y%2==0){
        ll temp = power(x,y/2);
        return (temp*temp)%MOD;
    }
    return (x*power(x,y-1))%MOD;
}
ll C(ll N,ll K){
    ll num =1;
    for(ll i=1;i<=K;i++){
        num=(N*num)%MOD;
        N--;
        num=(num*power(i,MOD-2))%MOD;
    }
    // return (num*power(den,MOD-2))%MOD;
    return num;
}

int main(){
    // std::ios_base::sync_with_stdio(false);
 //    cin.tie(NUlong long int);
 //    cout.tie(NUlong long int);
    ll i,r,q,l,z,x,y,j,t,k,n,m;
   	ll a[100000];
   	cin>>n>>m>>k;
   	if(m==1&&k>0){
   		cout<<"0";
   		return 0;
   	}
   	if(k==0){
   		cout<<m;
   		return 0;
   	}
   	l=C(n-1,k);
   	//cout<<l;
   	ll ans;
   	if(m>1){
   	ans=m-1;
   	if(k)
   	ans=power(ans,k);
	}
	else
	ans=1;
   	ans=ans*m;
   	ans%=MOD;
   	//cout<<ans<<" ";
   	ans=ans*l;
   	ans%=MOD;
   	cout<<ans;

    return 0;

}

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define x first
#define y second
#define pii pair<int,int>
const int MOD =998244353;
int dp[2001][2001];

int main()
{
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    int n,m,k;
    cin >> n >> m >> k;
    //dp[i][j] - количестов вариантов покрасить i кирпичей так чтобы было j+1 отрезков

    for (int i = 0; i <= n; i++)
        for (int j = 0; j <= k; j++)
            dp[i][j] = 0;
    for (int i = 1; i <= n; i++)
        dp[i][0] = m;
    for (int i = 2; i <= n; i++)
    {
        for (int j = 1; j <= k && i > j; j++)
        {
            dp[i][j] = (1ll*dp[i-1][j-1]*(m-1))%MOD;
            dp[i][j] = (dp[i][j] + dp[i-1][j]) % MOD;
        }
    }
    cout << dp[n][k];
    return 0;
}

#define DEBUG 0

#include <algorithm>
#include <functional>
#include <numeric>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <cassert>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <sstream>
using namespace std;

#define LL long long
#define LD long double
#define PR pair<int,int>

#define Fox(i,n) for (i=0; i<n; i++)
#define Fox1(i,n) for (i=1; i<=n; i++)
#define FoxI(i,a,b) for (i=a; i<=b; i++)
#define FoxR(i,n) for (i=(n)-1; i>=0; i--)
#define FoxR1(i,n) for (i=n; i>0; i--)
#define FoxRI(i,a,b) for (i=b; i>=a; i--)
#define Foxen(i,s) for (i=s.begin(); i!=s.end(); i++)
#define Min(a,b) a=min(a,b)
#define Max(a,b) a=max(a,b)
#define Sz(s) int((s).size())
#define All(s) (s).begin(),(s).end()
#define Fill(s,v) memset(s,v,sizeof(s))
#define pb push_back
#define mp make_pair
#define x first
#define y second

template<typename T> T Abs(T x) { return(x<0 ? -x : x); }
template<typename T> T Sqr(T x) { return(x*x); }
string plural(string s) { return(Sz(s) && s[Sz(s)-1]=='x' ? s+"en" : s+"s"); }

const int INF = (int)1e9;
const LD EPS = 1e-12;
const LD PI = acos(-1.0);

//#if DEBUG
#define GETCHAR getchar
/*#else
#define GETCHAR getchar_unlocked
#endif*/

bool Read(int &x)
{
	char c,r=0,n=0;
	x=0;
		for(;;)
		{
			c=GETCHAR();
				if ((c<0) && (!r))
					return(0);
				if ((c=='-') && (!r))
					n=1;
				else
				if ((c>='0') && (c<='9'))
					x=x*10+c-'0',r=1;
				else
				if (r)
					break;
		}
		if (n)
			x=-x;
	return(1);
}

bool ReadLL(LL &x)
{
	char c,r=0,n=0;
	x=0;
		for(;;)
		{
			c=GETCHAR();
				if ((c<0) && (!r))
					return(0);
				if ((c=='-') && (!r))
					n=1;
				else
				if ((c>='0') && (c<='9'))
					x=x*10+c-'0',r=1;
				else
				if (r)
					break;
		}
		if (n)
			x=-x;
	return(1);
}

#define MOD 998244353
#define LIM 2002

int dyn[LIM][LIM];

int main()
{
		if (DEBUG)
			freopen("in.txt","r",stdin);
	int N,M,K;
	int i,j,k,a,b,c,x,y,z;
	Read(N),Read(M),Read(K);
	dyn[1][0]=M;
		Fox1(i,N-1)
			Fox(j,K+1)
			{
				LL d=dyn[i][j];
				dyn[i+1][j]=(dyn[i+1][j]+d)%MOD;
				dyn[i+1][j+1]=(dyn[i+1][j+1]+d*(M-1))%MOD;
			}
	printf("%d\n",dyn[N][K]);
	return(0);
}

#include<bits/stdc++.h>
using namespace std;
long long dp[2005][2005]={0};
const long long mod =998244353;
int main()
{
	long long n,m,k;
	long long i,j,a,b,c;
	cin>>n>>m>>k;
	for(i=1;i<=n;++i)
		dp[i][0]=m;
	for(i=1;i<=n;++i)
	{
		for(j=1;j<=min(k,i-1);++j)
		{
			dp[i][j]=dp[i-1][j-1]*(m-1)+dp[i-1][j];
			dp[i][j]%=mod;
		}
	}
	cout<<dp[n][k];
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define F first
#define S second
#define pb push_back
#define setbits(x) __builtin_popcount(x)
#define zrobits(x) __builtin_ctz(x)
#define all(x) x.begin(),x.end()
#define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mod 998244353
#define endl "\n"

const int N=2010;
ll n,m,k,dp[N][N];

ll fun(ll n,ll k)
{
	if(n>0 && n==k){
		return 0;
	}
	if(k<0){
		return 0;
	}
	if(n==0){
		if(k==0){
			return m;
		}
		return 0;
	}
	if(dp[n][k] != -1){
		return dp[n][k];
	}
	return dp[n][k] = (fun(n-1,k)%mod + (fun(n-1,k-1)*(m-1)) % mod) % mod;
}
ll power_mod(ll x, ll y)
{
    x%=mod;
    ll res=1;

    while(y){
        if(y&1){
            res = (res*x)%mod;
        }
        y/=2;
        x=(x*x)%mod;
    }
    return res;
}
void solve()
{
	cin >> n >> m >> k;
	memset(dp,-1,sizeof(dp));
	fun(n,k);

	cout << dp[n][k] << endl;
}

int main()
{
    FAST;
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int tc=1;
    //cin >> tc;
    while(tc--){
        solve();
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define vec vector
#define mp make_pair
const double EPS = 1e-7;
const int M = 998244353;

void print(vector<int> &a) {
  for (int i = 0; i < a.size(); ++i)
    cout << a[i] << " ";
    cout << endl;
}

signed main() {
  int n, m, k;
  cin >> n >> m >> k;
  vec<vec<int> > dp(k + 1, vec<int>(n, 0));
  for (int i = 0; i < n; ++i) dp[0][i] = m;
  for (int i = 1; i < k + 1; ++i) {
    for (int h = i; h < n; ++ h) {
      dp[i][h] += (((dp[i - 1][h - 1] * (m - 1)) % M) + dp[i][h - 1]);
      dp[i][h] %= M;
    //  cout << dp[i][h] << " ";
    }
   // cout << endl;
  }
   cout << dp.back().back();
}

#include<bits/stdc++.h>
//typedef long long ll;
//#define int         long long
#define F           first
#define S           second
#define endl        "\n"
#define pb          push_back
#define mp          make_pair
#define all(x)      x.begin(),x.end()
#define memset(a,b) memset(a,b,sizeof(a));
#define IOS         ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
using namespace std;
const int inf=0x3f3f3f3f;
const int MAXN=0x7fffffff;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
void file()
{
#ifdef ONLINE_JUDGE
#else
    freopen("cin.txt","r",stdin);
    //  freopen("cout.txt","w",stdout);
#endif
}
#define int long long
const int Clen=2e3+5;
const int mod=998244353;
int C[Clen][Clen];
void getC()
{
    for(int i=0;i<Clen;i++)
    {
        for(int j=0;j<=i;j++)
        {
            if(j==0||j==i)
                C[i][j]=1;
            else
                C[i][j]=(C[i-1][j]+C[i-1][j-1])%mod;
        }
    }
}
signed main()
{
     IOS;
     //file();
     getC();
     int n,m,k;
     cin>>n>>m>>k;
     int ans=m;
     for(int i=0;i<k;i++)
        ans=ans*(m-1)%mod;
     ans=ans*C[n-1][k]%mod;
     cout<<ans<<endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,m,k,dp[2005][2005];
const int MOD=998244353;
int main(){
	cin>>n>>m>>k;
	dp[1][0]=m;
	for(int i=2;i<=n;i++){
		for(int j=0;j<=k;j++){
			dp[i][j]=dp[i-1][j];
			if(j!=0)dp[i][j]=(dp[i][j]+1LL*(m-1)*dp[i-1][j-1])%MOD;
		}
	}
	cout<<dp[n][k]<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll SIZE = 100000;
const ll maxn = 5000 + 10;
const ll MOD = 998244353;
ll fac[SIZE], inv[SIZE];
ll pow(ll a, ll b, ll m)
{
    ll ans = 1;
    while(b)
    {
        if(b & 1)
            ans = (ans * a) % m;
        b /= 2;
        a = (a * a) % m;
    }
    return ans;
}
ll C(int x, int y)
{
    if(y < 0 || y > x)
        return 0;
    return fac[x] * inv[y] % MOD * inv[x - y] % MOD;
}
void build()
{
    fac[0] = 1;
    for(int i=1;i<SIZE;i++)
    {
        fac[i] = fac[i - 1] * i % MOD;
    }
    inv[SIZE - 1] = pow(fac[SIZE - 1], MOD - 2,MOD);
    for(int i = SIZE - 2; i >= 0; i--)
        inv[i] = inv[i + 1] * (i + 1) % MOD;
}
int main()
{
   ll a, b;
    build();
    ll n,m,k;
    cin>>n>>m>>k;
    ll ans=m;
    for(ll i=0;i<k;i++)
        ans=ans*(m-1)%MOD;
    cout<<ans*C(n-1,k)%MOD<<endl;
}

// Created by arvybhatt

#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define F first
#define S second
#define p_b push_back
#define m_p make_pair
#define rep(i,n) for(int i=0;i<(n);++i)
#define repA(i,a,n) for(int i=a;i<=(n);++i)
#define repD(i,a,n) for(int i=a;i>=(n);--i)

#define ll long long int
using namespace std;

ll power(ll x, ll y) { ll temp; if( y == 0) return 1; temp = power(x, y/2); if (y%2 == 0) return temp*temp; else return x*temp*temp; }

const ll mod=998244353;

int main()
{
    fast;
    ll n,m,k;cin>>n>>m>>k;
    ll dp[n+1][k+1];
    memset(dp,0,sizeof(dp));
    for(int i=0; i<=n;	i++)
    	dp[i][0]=1;

    for(int i=2; i<=n; i++)
    {
    	for(int j=1; j<=min((ll)(i-1),k); j++)
    	{
    		dp[i][j]=(dp[i-1][j]+dp[i-1][j-1])%mod;
    	}
    }

    ll x=dp[n][k];
   // cout<<x<<" ";

    ll cal=m;
    for(int i=1; i<=k; i++)
    {
    	cal=(cal*(m-1))%mod;
    }
    cout<<(cal*x)%mod;

}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 998244353

int main()
{
    ll n,m,k;
    cin>>n>>m>>k;
    vector<vector<ll> > f(n+1,vector<ll> (k+1,0));
    for(ll i=1;i<=n;i++)
    f[i][0]=m;
    for(ll i=2;i<=n;i++)
    {
        for(ll j=1;j<=k;j++)
        {
            f[i][j]=((f[i-1][j]%mod)+((f[i-1][j-1]%mod)*((m-1)%mod))%mod)%mod;
        }
    }
    cout<<f[n][k];
}

#include<bits/stdc++.h>
#define MOD 998244353
#define maxn 2048
#define endl "\n"
using namespace std;
long long n,m,k,ans;
long long comb[maxn][maxn];
int main()
{
    cin>>n>>m>>k;
    int i,j;
    ans=m;
    for(i=1;i<=k;i++)
    {
        ans*=(m-1);
        ans%=MOD;
    }
    n--;
    comb[0][0]=1;
    for(i=1;i<=n;i++)
    {
        comb[i][0]=1;
    }
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=i;j++)
        {comb[i][j]=comb[i-1][j]+comb[i-1][j-1];
        comb[i][j]%=MOD;}
    }
    cout<<((ans%MOD)*(comb[n][k])%MOD)%MOD<<endl;
    return 0;

}

//Problem:
//Date:
//Skill:
//Bug:
/////////////////////////////////////////definations////////////////////
#define CLR(a) memset((a),0,sizeof(a))
#define RE(i,n)  for(int i=0;i<n;i++)
#define RE2(i,n) for(int i=1;i<=n;i++)
#define IN(n) scanf("%d",&n)
#define LLIN(n) scanf("%lld",&n)
#define INC(c) do{scanf("%c",&c);}while(isspace(c))
#define PI(a) printf("%d",a)
#define LLPI(a) printf("%lld",a)
#define PN	puts("");
using namespace std;
const long long llinf = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
///////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////options////////////////////////////////
const int maxn = int(2e3+10);
typedef long long ll;
#define stdcpph
#define CPP_IO
//#define LOCAL

#ifdef stdcpph
#include<bits/stdc++.h>
#else
#include<ctype.h>
#include<string.h>
#include<math.h>
#include<vector>
#include<map>
#include<algorithm>
#ifdef CPP_IO
#include<iostream>
#include<iomanip>
#include<string>
#else
#include<stdio.h>
#endif
#endif

///////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////Added Functions/////////////////////
const int MOD(998244353);
int n, m, k;
int dp[maxn][maxn];
ll fun(int num, int di)//前面1块易途，求后面涂num块，di个相同的的方法
{
	if (num == 1)
	{
		if (di == 0)return m - 1;
		else if (di == 1)return 1;
		else return 0;
	}

	{
		ll a(fun(num - 1, di - 1));//
		ll b((m - 1)*fun(num - 1, di));
		//return (a + b)% MOD;
		return fun(num - 1, di - 1);
	}
}
///////////////////////////////////////////////////////////////////////////
int main()
{
	int T(1), times(0);
#ifdef LOCAL //LOCAL
	freopen("C:\\Users\\VULCAN\\Desktop\\data.in", "r", stdin);
#endif

#ifdef CPP_IO// CPP_IO
	std::ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	//cin >> T;
#else
	//IN(T);
#endif

	//How to think:
	//先认真读题，把题目逻辑化，读清全部条件，再做，不然，哼哼
	//写题的时候遇到的一些”莫名“的错误大部分是自己的代码写错了一个变量
	//1.分治 2.容斥 3.化多元为单元
	//4.dp 分阶段，后阶段受前阶段的影响
	//5.凡是有很大的指数的，都可以先用log算一下
	//6.预处理，作用非常大，很快
	//
	//1.Do you use cout/cin? Do not use!
	//2.what's the maximum Int data? Is it beyond I32d?
	//3.Ever Mod after neccesary calculation?
	//4.Ever Cleaned the array before using?
	///////////////////////////////////////////code////////////////////////////////
	while (++times, T--,cin>>n>>m>>k)
	{
		if (n == 1)cout << m << endl;
		else if (m == 1)
		{
			if (k > 0)cout << 0 << endl;
			else cout << m << endl;
		}
		else
		{
			k = n - 1 - k;
			dp[1][0] = m - 1; dp[1][1] = 1;
			for (int i = 2; i <= n - 1; ++i)
			{
				for (int j = 0; j <= k; ++j)
				{
					if(j)
						dp[i][j] = (dp[i - 1][j - 1] + 1LL*dp[i - 1][j] * (m - 1)) % MOD;
					else
						dp[i][j] = (1LL * dp[i - 1][j] * (m - 1)) % MOD;
				}
			}
			cout << (1LL*dp[n - 1][k] * m%MOD) << endl;
		}

	}
	//////////////////////////////////////////////////////////////
	//dividing line
	return 0;
}

#include<stdio.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<map>
#include <string>
#include<string.h>
#include<iostream>
#include<math.h>
#include<set>
#include<iomanip>
#include<vector>
#define ll long long
#define ull unsigned long long
#define inf 0x3f3f3f3f3f
#define pi 3.1415926535
const double g = 9.8;
using namespace std;
const ll mod = 998244353;
ll quick(ll prea, ll bbb) { ll res = 1;	while (bbb) { if (bbb & 1) res = res * prea%mod;		prea = prea * prea%mod;		bbb >>= 1; }	return res; }
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a%b); }
pair<int, int> pp;
const int w = 1e6 + 10;
int main()
{
	ll i, j, k, m, n, t;
	cin >> n >> m >> k;
	ll ans = 1;
	n--;
	ans = quick(m - 1, k)* m % mod;
	ll res = 1;
	t = 1;
	for (i = k + 1; i <= n; i++)
		res = res * i % mod;
	for (i = 1; i <= n - k; i++)
		t = t * i % mod;
	t = quick(t, mod - 2);
	t = res * t%mod;
	cout << ans*t % mod << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int mod = 998244353;

inline int inv(int a) {
	a %= mod;
	if(a < 0) a += mod;
	int b = mod, u = 0, v = 1;
	while(a) {
		int t = b / a;
		b -= t * a; swap(a, b);
		u -= t * v; swap(u, v);
	}
	assert(b == 1);
	if(u < 0) u += mod;
	return u;
}

int main() {
	int n,m,k;
	scanf("%d%d%d",&n,&m,&k);
	long long ans = m;
	for(int i = 1;i <= k;i++) {
		ans = ans * (m-1) % mod;
	}
	for(int i = 1;i <= n - 1;i++) {
		ans = ans * i % mod;
	}
	for(int i = 1;i <= k;i++) {
		ans = ans * inv(i) % mod;
	}
	for(int i = 1;i <= n - k - 1;i++) {
		ans = ans * inv(i) % mod;
	}
	printf("%lld\n",ans);
}

#include <iostream>
#define int long long
using namespace std;

const int MAXN=2e3+5;
const int mod=998244353;

int n,m,k,dp[MAXN][MAXN];

signed main()
{
    cin>>n>>m>>k;
    for(int i=0;i<=n;i++) dp[i][0]=m;
    for(int i=2;i<=n;i++)
    {
    	for(int j=1;j<=k;j++)
    	{
    		dp[i][j]=(dp[i-1][j-1]*(m-1))%mod;
    		dp[i][j]=(dp[i][j]+dp[i-1][j])%mod;
		}
	}
	cout<<dp[n][k];
}

#include<bits/stdc++.h>
using namespace std;

#define mod  998244353
long long c[2009][2009];

long long Cnm(int n,int m) {
	if(n < m) return 0;
	if(m == 0 || m == n) return 1;
	c[0][0] = 1;
	for(int i = 1;i <= n;i++) {
		c[i][0] = c[i][n] = 1;
		for(int j = 1;j < n;j++) {
			c[i][j] = (c[i-1][j-1] + c[i-1][j]) % mod;
		}
	}
	return c[n][m];
}

long long kpow(int a,int p) {
	long long res = 1;
	long long tmp = a;
	while(p) {
		if(p&1) res = res * tmp % mod;
		tmp = tmp * tmp % mod;
		p >>= 1;
	}
	return res % mod;
}

int main() {
	int n, m ,k;
	cin >> n >> m >> k;
	long long ans = m * Cnm(n-1,k) % mod;
	ans = ans * kpow(m-1,k) % mod;
	printf("%lld\n",ans);
}

// Lê Duy Anh
#include <bits/stdc++.h>
using namespace std;
#define f(i, x, y) for(int i = x; i <= y; ++i)
#define fn(i, x, y) for(int i = x; i >= y; --i)
#define ll long long
#define maxn 2005
int const q=1e9+7;
ll c[maxn][maxn];
long long cal(ll x, ll y){
    if(y==0) return 1;
    else return x*cal(x,y-1)%998244353;
}
long long gth(ll x){
     if(x==1) return 1;
     else return x*gth(x-1)%q;
}
long long ckn(ll k, ll n){
    f(i, 0, n)
        f(j, 0, i)
            if(i==j || j== 0) c[j][i] = 1;
            else c[j][i] = (c[j-1][i-1] + c[j][i-1]) % 998244353;
    return c[k][n];
}
// 1+1=2?
ll n, m, k;
int main()
{
     cin >> n >> m >> k;
     cout << ((m*cal(m-1,k))%998244353*ckn(k,n-1))%998244353;
     return 0;
}

#include<bits/stdc++.h>
#define fi first
#define se second
#define FOR(a) for(int i=0;i<a;i++)
#define sc(a) scanf("%d",&a)
#define show(a) cout<<a<<endl;
#define show2(a,b) cout<<a<<" "<<b<<endl;
#define show3(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl;
using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<P, int> LP;
const ll inf = 1e17 + 10;
const int N = 1e6 + 10;
const ll mod = 998244353;

map<string, int>ml;

ll b[N], vis[N], po[N], num[N], t, n, m, x, y, k, f[2500][2500],a[N];
ll ex, ey, cnt, ans, sum, flag;
ll dist[N];
ll dp[N];
string s ;

vector<ll> v[N];
map<int, int> mp;

ll ksm(ll x,ll n)
{
	ll ans=1;
	while(n)
	{
		if(n&1) ans=(ans*x)%mod;
		n>>=1;
		x=(x*x)%mod;

	}
	return ans%mod;
}
int main()
{
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	cin>>n>>m>>k;
	for(int i=0;i<=n;i++) f[i][0]=1;
	f[1][1]=1;
	for(int i=2;i<=n;i++)
	{
		for(int j=1;j<=i;j++)
		{
			f[i][j]=(f[i-1][j-1]+f[i-1][j])%mod;
		}
	}
	ll ans=(f[n-1][k]*m)%mod;
	cout<<ans*ksm(m-1,k)%mod<<endl;

}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long long unsigned int llui;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector< vector<int> > vvi;
typedef set<int> si;
typedef map<string, int> msi;
typedef map<int, int> mii;

#define INF 1000000000
#define MOD 1000000007
#define EPS 1e-9
#define DEBUG(x) cout<< '>' << #x << ':' << x << "\n";
#define ALL(x) (x).begin(), (x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define UNIQUE(x) SORT(x),(x).erase(unique((x).begin(),(x).end()),(x).end())
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define SZ(a) int((a).size())
#define clr(a) memset(a,0,sizeof(a))
#define SET(a,b) memset(a,b,sizeof(a))

#define FOR(i,a,b) for (int i = int(a); i < int(b); i++)
#define FORD(i,a,b) for(int i=int(b)-1; i>=int(a); i--)
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define REP1(i,n) for (int i = 1; i <= int(n); i++)
#define REV(i, n) for (int i = int(n)-1; i >=0 ; i--)

#define si(n) scanf("%d",&n)
#define dsi(n) int n; scanf("%d",&n)
#define si2(a,b) scanf("%d%d",&a,&b)
#define dsi2(a,b) int a,b; scanf("%d%d",&a,&b)
#define dout(n) printf("%d\n",n)
#define sll(n) scanf("%lld",&n)
#define dsll(n) ll n; scanf("%lld",&n)
#define sll2(a,b) scanf("%lld%lld",&a,&b)
#define dsll2(a,b) ll a,b; scanf("%lld%lld",&a,&b)
#define lldout(n) printf("%lld\n",n)
#define print(x) cout<< x << "\n"

#define trace(x) cout << '>' << #x << ':' << x << "\n"
#define trace2(x,y) cout<< '>' << #x << ':' << x << " | " << #y << ':' << y << "\n"
#define trace3(a,b,c) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define trace4(a,b,c,d) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"

inline int two(int n) { return 1 << n; }
inline int test(int n, int b) { return (n>>b)&1; }
inline void set_bit(int & n, int b) { n |= two(b); }
inline void unset_bit(int & n, int b) { n &= ~two(b); }
inline int last_bit(int n) { return n & (-n); }
inline int ones(int n) { int res = 0; while(n && ++res) n-=n&(-n); return res; }

#define LSOne(S) (S&(-S))

const double pi = acos(-1);
const int oo = 0x3f3f3f3f;

int cmp(double x, double y = 0, double tol = EPS) {
    return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}

/////////////////////////////////////////////////////////////////////

const int MAX_N = 2234506;
//int arr[MAX_N];

int main(){
    dsi2(n,m);dsi(k);
    int mod=998244353;
    vector<vll> V=vector<vll>(n+1,vll(k+1));
    REP1(i,n) V[i][0]=m;
    m--;
    REP1(i,n){
        REP1(j,k){
            V[i][j]=(mod+(V[i-1][j-1]*m)%mod+V[i-1][j])%mod;
        }}
    printf("%lld\n",V[n][k]);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define mainspring cout<<"mainspring\n";
#define barrel cout<<"barrel\n";
#define escapement cout<<"escapement\n";

#define pb push_back
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define sz(v) (int)((v).size())
#define fs first
#define sd second
#define tik(i,a,b) for(int i = a; i < b; i++)
#define tok(i,a,b) for(int i = a; i >= b; i--)
#define error(args...) {string _s = #args; replace(_s.begin(), _s.end(), ',',' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it,args);}
#define int ll

typedef long long ll;
typedef unsigned long long ull;

typedef pair < int, int > pi;
typedef pair < pi, int > ppi;

typedef vector < int > vi;
typedef vector < vector < int > > vvi;
typedef vector < pi > vpi;
typedef vector < vpi > vvpi;
typedef vector < ppi > vppi;

void fast() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}

void err(istream_iterator<string> it) {cout << endl;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << " ";
    err(++it, args...);
}

const int MAX = 2E3 + 100, MOD = 998244353;
int dp[MAX][MAX], n, m, k;

//dp[n][k] = dp[n-1][k] + (m - 1)*dp[n-1][k-1]
int solve(int i, int j) {
	if(dp[i][j] != -1) {
		return dp[i][j];
	}
	if(i == 0)
		return dp[i][j] = 0;
	if(j == 0)
		return dp[i][j] = m;
	int res = (m-1)*solve(i-1,j-1);
	res %= MOD;
	res += solve(i-1,j);
	res %= MOD;
	return dp[i][j] = res;
}
int32_t main() {
	// int n, m, k;
	memset(dp,-1,sizeof(dp));
	cin >> n >> m >> k;
	// dp[0][0] = 1;
	// for(int i = 1; i <= n; i++) {
	// 	for(int j = 0; j <= k; j++) {
	// 		if(j == 0) {
	// 			dp[i][0] = m;
	// 			continue;
	// 		}
	// 		dp[i][j] = dp[i-1][j];
	// 		if(j)
	// 			dp[i][j] += (m - 1)*dp[i-1][j];
	// 		dp[i][j] %= MOD;
	// 	}
	// }
	cout << solve(n,k);
}

#include <bits/stdc++.h>
using namespace std;

#define mainspring cout<<"mainspring\n";
#define barrel cout<<"barrel\n";
#define escapement cout<<"escapement\n";

#define pb push_back
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define sz(v) (int)((v).size())
#define fs first
#define sd second
#define tik(i,a,b) for(int i = a; i < b; i++)
#define tok(i,a,b) for(int i = a; i >= b; i--)
#define error(args...) {string _s = #args; replace(_s.begin(), _s.end(), ',',' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it,args);}

typedef long long ll;
typedef unsigned long long ull;

typedef pair < int, int > pi;
typedef pair < pi, int > ppi;

typedef vector < int > vi;
typedef vector < vector < int > > vvi;
typedef vector < pi > vpi;
typedef vector < vpi > vvpi;
typedef vector < ppi > vppi;

void fast() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}

void err(istream_iterator<string> it) {cout << endl;}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << " ";
    err(++it, args...);
}

const int MAX = 2E3 + 100, MOD = 998244353;
ll dp[MAX][MAX];

int main() {
	int n, m, k;
	cin >> n >> m >> k;
	for(int i = 1; i < n + 1; i++) {
		dp[i][0] = m;
	}
	for(int i = 1; i <= n; i++) {
		for(int j =1 ; j <= k; j++) {
			dp[i][j] += (m - 1)*dp[i-1][j-1];
			dp[i][j] %= MOD;
			dp[i][j] += dp[i-1][j];
			dp[i][j] %= MOD;
		}
	}
	cout << dp[n][k];
}

#include<bits/stdc++.h>
#define fi first
#define se second
#define FOR(a) for(int i=0;i<a;i++)
#define sc(a) scanf("%d",&a)
#define show(a) cout<<a<<endl;
#define show2(a,b) cout<<a<<" "<<b<<endl;
#define show3(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl;
using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<P, int> LP;
const ll inf = 1e17 + 10;
const int N = 1e6 + 10;
const ll mod = 998244353;

map<string, int>ml;

ll b[N], vis[N], po[N], num[N], t, n, m, x, y, k, f[2500][2500],a[N];
ll ex, ey, cnt, ans, sum, flag;
ll dist[N];
ll dp[N];
string s ;

vector<ll> v[N];
map<int, int> mp;

ll ksm(ll x,ll n)
{
	ll ans=1;
	while(n)
	{
		if(n&1) ans=(ans*x)%mod;
		n=n>>1;
		x=(x*x)%mod;

	}
	return ans%mod;
}
int main()
{
	ios::sync_with_stdio ( false );
	cin.tie ( 0 );

	cin>>n>>m>>k;
	for(int i=0;i<=n;i++) f[i][0]=1;
	f[1][1]=1;
	for(int i=2;i<=n;i++)
	{
		for(int j=1;j<=i;j++)
		{
			f[i][j]=(f[i-1][j-1]+f[i-1][j])%mod;
		}
	}
	cout<<(((m*ksm(m-1,k))%mod)*f[n-1][k])%mod<<endl;

}

#include <bits/stdc++.h>
#define mod 998244353
#define N 2000
using namespace std;
typedef long long ll;

//Formula
/*
(n-1 k) m (m-1)^k

APROX 3:
Calcular el numero combinatorio, en vez de dividir, multiplicar por el inverso en Zmod
Que existe, mod es primo
*/

ll inv[N+7];

//Inversos de los 2000 primeros numeros en Zmod
void init() {
	memset(inv,0,sizeof(inv));
	inv[1] = 1;
	inv[0] = 1;
	for(ll i=2;i<=N;i++) {
		inv[i]=((mod-mod/i)*inv[mod%i])%mod;
	}
}

//numero combinatorio MODULO
ll nc (ll n, ll k) {
	ll res = 1;
	for(ll i = 0; i < k; ++i) {
		res = (res*(n-i))%mod;
	}
	for(ll i = 2; i <= k; ++i) {
		res = (res*inv[i])%mod;
	}
	return res;
}

int main() {
	ll n, m, k;
	init();
	cin >> n >> m >> k;

	if(n == 1) {
		if(k == 0)
			cout << m;
		else
			cout << '0';
	} else if(m == 1) {
		if (k == 0)
			cout << '1';
		else
			cout << '0';
	}else if(k == 0) {
		cout << m;
	}
	else {
		ll res = 1;
		res = nc(n-1, k) % mod;
		res = (res*m) % mod;
		//pow
		for(int i = 0; i < k; ++i)
			res = (res*(m-1)) % mod;
		cout << res % mod;
	}
	cout << endl;
}

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define F first
#define S second
#define ll long long int
#define pb push_back
#define mp make_pair
#define all(v) v.begin(),v.end()
#define tests int t;cin>>t;while(t--)
#define take(a,i,n) for(i=0;i<n;i++) cin>>a[i]
#define hell 998244353
#define ret(a) { cout<<a; return 0;}
#define fastio ios_base::sync_with_stdio(0); cin.tie(0);	cout.tie(0);
using namespace std;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector< pair< pii, int>  > vii;
using namespace __gnu_pbds;

typedef			//Order Statistics Tree
tree<
  ll,	//type
  null_type,
  less<ll>,
  rb_tree_tag,
  tree_order_statistics_node_update>
ordered_set; 	//order_of_key(x)=strictly less than x count, find_by_order(ind)=INDth smallest key(0 based), insert, erase.

ll power(ll x, ll y, ll m)
{
    if (y == 0)
        return 1;
    ll p = power(x, y/2, m) % m;
    p = (p * p) % m;

    return (y%2 == 0)? p : (x * p) % m;
}

ll modInverse(ll a, ll m)
{
    return power(a, m-2, m);
}
#define MAXN 10000001
int spf[MAXN];
// Calculating SPF (Smallest Prime Factor) for every
// number till MAXN.
// Time Complexity : O(nloglogn)
void sieve()
{
    spf[1] = 1;
    for (int i=2; i<MAXN; i++)

        // marking smallest prime factor for every
        // number to be itself.
        spf[i] = i;

    // separately marking spf for every even
    // number as 2
    for (int i=4; i<MAXN; i+=2)
        spf[i] = 2;

    for (int i=3; i*i<MAXN; i++)
    {
        // checking if i is prime
        if (spf[i] == i)
        {
            // marking SPF for all numbers divisible by i
            for (int j=i*i; j<MAXN; j+=i)

                // marking spf[j] if it is not
                // previously marked
                if (spf[j]==j)
                    spf[j] = i;
        }
    }
}
vector<int> getFactorization(int x)
{
    vector<int> ret;
    while (x != 1)
    {
        ret.push_back(spf[x]);
        x = x / spf[x];
    }
    return ret;
}

int main() {
	fastio
	int n,m,k,i,x;
	cin>>n>>m>>k;
	ll dp[n+1][n+1];
	for(i=0;i<=n;i++)
		dp[1][i]=0;
	dp[1][0]=m;
	for(i=2;i<=n;i++)
		for(x=0;x<=n;x++)
			if(x==0)
				dp[i][x] = dp[i-1][x]*(m-1), dp[i][x]%=hell;
			else
				dp[i][x] = dp[i-1][x-1]+dp[i-1][x]*(m-1), dp[i][x]%=hell;
	cout<<dp[n][n-1-k];

	return 0;
}

#include <bits/stdc++.h>
#define forn(i,n) for(int i=0; i<n; i++)
#define pb push_back
#define MOD 998244353
using namespace std;

long long int power(long long int a,long long int b){
	long long int sq=a*a;
	sq%=MOD;
	if (b==0) {return 1;}
	else if (b%2==0) {long long int hold=power(sq,b/2); hold%=MOD; return hold;}
	else {long long int hold=(a*power(sq,b/2)); hold%=MOD; return hold;}
}

int main(){
	int n,m,k;
	cin>>n>>m>>k;
	vector< vector<long long int> >arr(n+1,vector<long long int>(k+1,0));
	arr[1][0]=m;
	for(int i=1;i<n;i++){
		for(int j=0;j<k;j++){
			arr[i+1][j]+=arr[i][j];
			arr[i+1][j]%=MOD;
			arr[i+1][j+1]+=arr[i][j]*(m-1);
			arr[i+1][j+1]%=MOD;
		}
		arr[i+1][k]+=arr[i][k];
		arr[i+1][k]%=MOD;
	}
	cout<<arr[n][k];
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 998244353;
ll dp[2005][2005];
int main()
{
    int n,m,k;
    cin>>n>>m>>k;
    dp[1][0] = m;
    for(int i=2;i<=n;i++)
    {
        for(int j=0;j<=k;j++)
        {
            if(j>=i)break;
            if(j-1>=0) dp[i][j] =(dp[i][j]+ dp[i-1][j-1]*(m-1)%mod)%mod;
            dp[i][j] =(dp[i][j]+ dp[i-1][j])%mod;

        }
    }
    cout<<dp[n][k]<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define P 998244353
ll f[2005][2005];
int main()
{
	int n,m,k,i,j;
	cin>>n>>m>>k;
	for(i=1;i<=n;i++)for(f[i][0]=m,j=1;j<i;j++)f[i][j]=(f[i-1][j]+(ll)(m-1)*f[i-1][j-1])%P;
	cout<<f[n][k]<<endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define pii pair<int,int>
#define ll long long
#define pll pair<ll,ll>
#define vi vector<int>
#define vii vector<pii>
#define vll vector<ll>
#define MOD 998244353
#define EPS 1e-7
#define mem(x,y) memset(x,y,sizeof x)
#define INF 1e9
#define ff(i,a,b) for(int i=(a);i<=(b);i++)
#define fb(i,a,b) for(int i=(a);i>=(b);i--)
#define dist2D(x1,y1,x2,y2) ((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
#define dist3D(x1,y1,z1,x2,y2,z2) ((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2))
#define sortv(v) sort(v.begin(),v.end())

class compare{
public:
    bool operator()(pii x,pii y){
        if(x.second==y.second){
            return x.first<y.first;
        }
        return x.second<y.second;
    }
};

ostream& operator<<(ostream &os,const pll &a){
    os<<a.first<<" "<<a.second;
}

pll operator+(const pll &a, const ll &b){ return { a.first+b,a.second+b };}
pll operator*(const pll &a,const ll &b){ return {a.first*b,a.second*b};}
pll operator+(const pll &a,const pll &b){ return {a.first+b.first,a.second+b.second};}
pll operator-(const pll &a,const pll &b){ return { a.first-b.first,a.second-b.second};}
pll operator*(const pll &a,const pll &b){ return {a.first*b.first,a.second*b.second};}
pll operator%(const pll &a,const pll &b){ return {a.first%b.first,a.second%b.second};}

int Set(int N,int pos) { return N=N|(1<<pos); }
int reset(int N,int pos){ return N=N&~(1<<pos);}
bool check(int N,int pos){  return (bool) (N&(1<<pos));}

int k;
int n,m;

ll bigmod(ll a,ll b){
    if(b==0) return 1;
    ll x=bigmod(a,b/2);
    x=(x*x)%MOD;
    if(b&1) x=(a*x)%MOD;
    return x;
}

ll dp[2005][2000];

ll ret(int id,ll cnt){
    if(id==n+1){
        if(cnt==k) return 1;
        else return 0;
    }

    if(dp[id][cnt]!=-1) return dp[id][cnt];

    ll val1,val2;

    val1=ret(id+1,cnt);
    val2=ret(id+1,cnt+1);

    return dp[id][cnt]=(val1+val2)%MOD;

}

int main()
{
        ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

         cin>>n>>m>>k;
    mem(dp,-1);

        if(k==0){
            cout<<m<<endl;
            return 0;
        }

        if(m==1){
            cout<<0<<endl;
            return 0;
        }
        if(n==1){
            cout<<m<<endl;
            return 0;
        }

        ll ans=0;
        ans=ret(2,0);

    ///cout<<ans<<endl;

   // cout<<bigmod(m-1,k)<<endl;

        ans=(ans*bigmod(m-1,k))%MOD;
     ans=(ans*m)%MOD;
        cout<<ans<<endl;

        return 0;
}

#include <bits/stdc++.h>
#define int long long
using namespace std;

const int N = 2e3 + 7, MOD = 998244353;

int dp[N][N], P[N];

int f(int idx, int k) {
    if(!idx) return k == 0;
    if(~dp[idx][k]) return dp[idx][k];
    int ret = 0;
    if(k > 0) ret = (f(idx - 1, k - 1) + f(idx - 1, k)) % MOD;
    else      ret = f(idx - 1, k);
    return dp[idx][k] = ret;

}

int32_t main() {

    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    memset(dp, -1, sizeof dp);
    int n, m, k; cin >> n >> m >> k;

    P[0] = 1;
    for(int i = 1; i <= n; i++) {
        P[i] = (P[i - 1] * (m - 1)) % MOD;
    }
    if(k == 0) {
        cout << m << endl;
        return 0;
    }
    int ans = 0;
    for(int i = 1; i <= n - k; i++) {
        ans = (ans + ((m * f(n - i - 1, k - 1)) % MOD * P[k]) % MOD) % MOD;
    }
    cout << ans << endl;

}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 998244353

int n, m, k;
ll dp[2001][2001];

ll calc(int idx, int k) {
        if (idx == n-1)
                return k == 0? 1: 0;
        ll &ret = dp[idx][k];
        if (ret != -1)
                return ret;
        ret = 0;
        if (k) {
                ret += calc(idx + 1, k - 1);
                ret *= (m - 1);
                ret %= mod;
        }
        ret += calc(idx + 1, k);
        return ret%mod;
}

int main(){
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
        cin >> n>> m>> k;
        ll an = 0;
        memset(dp, -1, sizeof dp);
        an = calc(0, k)*m;
        an %= mod;
        cout <<an;
return 0;
}

#include<bits\stdc++.h>
#define int long long
#define endl '\n'
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define infi INT_MAX
#define rinfi INT_MIN
#define inf LLONG_MAX
#define rinf LLONG_MIN
#define ff first
#define ss second
#ifndef ONLINE_JUDGE
#define line cout<<"here - "<<__LINE__<<"\n";
#define dbg(a) cout<<#a<<" --> "<<(a)<<"\n";
#else
#define line
#define dbg(a)
#endif
using namespace std;
int mod=998244353;
int n,m,k,dp[2001][2001];
int solve(int pos,int br)
{
    if(pos==n)
    {
        if(br==k)
            return 1;
        return 0;
    }
    if(dp[pos][br]!=-1)
        return dp[pos][br];
    int ans=0;
     ans=(ans+(m-1)*solve(pos+1,br+1))%mod;

      ans=(ans+solve(pos+1,br))%mod;
      return dp[pos][br]=ans;
}
main()
{
    fast
    int tc=1,i,j;
    //cin>>tc;
    while(tc--)
    {
      cin>>n>>m>>k;
      memset(dp,-1,sizeof dp);
      cout<<(solve(1,0)*m)%mod<<endl;
    }
}

//
//  main.cpp
//  181216_코포_C
//
//  Created by 박다원 on 17/12/2018.
//  Copyright © 2018 Park Dawon. All rights reserved.
//

#include <iostream>
#include <string.h>

using namespace std;

const long long MOD = 998244353;

int n, m, k;

long long dp[2005][2005];

int main(int argc, const char * argv[])
{
    cin >> n >> m >> k;

    dp[0][0] = m;
    for(int i = 0; i < n; i++)
    {
        dp[i+1][0] = dp[i][0];
        dp[i+1][0] %= MOD;
        dp[i+1][1] = dp[i][0] * (m-1);
        dp[i+1][1] %= MOD;
        for(int j = 1; j < i+1; j++)
        {
            dp[i+1][j] += dp[i][j];
            dp[i+1][j] %= MOD;
            dp[i+1][j+1] += dp[i][j] * (m-1);
            dp[i+1][j+1] %= MOD;
        }
    }

    cout << dp[n-1][k] << endl;
}

#include<bits/stdc++.h>
#define ABS(a) ((a < 0) ? ((-1)*(a)) : (a))
#define F(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define RF(i,a,b) for(long long i = (long long)(a); i >= (long long)(b); i--)
#define MIN3(a,b,c) (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c))
#define MAX(a,b) (a)>(b)?(a):(b)
#define MIN2(a,b) (a)<(b)?(a):(b)
#define SIEVELIM 10000000+10
#define coud(a,b) cout<<fixed << setprecision((b)) << (a)
using namespace std;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef long long ll;
#define ull unsigned long long
typedef long double ld;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return a * (b / gcd(a, b)); }
#define deb(x )     cerr << #x << " here "<< x << endl;
#define endl    "\n"

inline bool is_palindrome(const string& s){ return std::equal(s.begin(), s.end(), s.rbegin()); }

const ll MOD = 998244353;
const ll INF = 1e9+5;
const double eps = 1e-7;
const double PI = acos(-1.0);
/*----------------------------------------------------------------------*/

const int MAXN = 2005;

ll dp[MAXN][MAXN];

int main(){
    std::ios::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);
    // Pay attention to TLE in case of cin/cout. n >= 10^6.
    // Pay attention to overflow.
    ll n,m,k;
    cin>>n>>m>>k;
    F(i, 1, n+1) {
    	dp[i][0] = m;
    }

    F(i, 2, n+1) {
    	F(j, 1, k+1) {
    		dp[i][j] = ((dp[i-1][j])%MOD + (dp[i-1][j-1]*(m-1)) % MOD)%MOD;
    	}
    }
    cout<<dp[n][k];
    return 0;
}/*

*/

#include <bits/stdc++.h>
using namespace std;

#define mp make_pair
#define itn int
#define all(x) (x).begin(), (x).end()
#define ldb ldouble
#define szz(x) (int)(x).size()
#define repi(i, p, n) for(int i=p;i<n;i++)
#define repl(i, p, n) for(ll i=p;i<n;i++)
#define Se second
#define Fi first
#define C(x) cout<<x;
#define Ex(x) return x;
#define Endl(x) cout<<endl;
#define CINvector(a,n) repl(i,0,n){ll te; cin>>te; a.push_back(te);}
#define in_(a,b) a.push_back(b);
#define Fnd(a,x) (find(a.begin(), a.end(), x)!=a.end())
#define pb push_back

typedef tuple <int, int, int> t3;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <db, db> pdd;

class BigInteger
{
public:
    BigInteger()
    {
        _data.push_back(0);
    }

    BigInteger(long long x)
    {
        while(x)
        {
            _data.push_back(x % _base);
            x /= _base;
        }

        if(_data.empty()) _data.push_back(0);
    }

    BigInteger(unsigned long long x)
    {
        while(x)
        {
            _data.push_back(x % _base);
            x /= _base;
        }

        if(_data.empty()) _data.push_back(0);
    }

    BigInteger(int x) : BigInteger((long long)x) {}
    BigInteger(unsigned int x) : BigInteger((unsigned long long)x) {}
    BigInteger(short x) : BigInteger((long long)x) {}
    BigInteger(unsigned short x) : BigInteger((unsigned long long)x) {}
    BigInteger(char x) : BigInteger((long long)x) {}
    BigInteger(unsigned char x) : BigInteger((unsigned long long)x) {}

    BigInteger(std::string &s)
    {
        for(int i = (int)s.size(); i > 0; i -= 9)
            if(i < 9)
                _data.push_back(atoi(s.substr(0, i).data()));
            else
                _data.push_back(atoi(s.substr(i - 9, 9).data()));

        while(_data.size() > 1 && _data.back() == 0)
            _data.pop_back();
    }

    BigInteger(const char *s)
    {
        std::string d = s;

        for(int i = (int)d.size(); i > 0; i -= 9)
            if(i < 9)
                _data.push_back(atoi(d.substr(0, i).data()));
            else
                _data.push_back(atoi(d.substr(i - 9, 9).data()));

        while(_data.size() > 1 && _data.back() == 0)
            _data.pop_back();
    }

    BigInteger(const BigInteger& b)
    {
        _data.resize(b._data.size());
        std::copy(b._data.begin(), b._data.end(), _data.begin());
    }

    void ToString(char *s) const
    {
        sprintf(s, "%d", _data.empty() ? 0 : _data.back());
        for(int i = (int)_data.size() - 2; i >= 0; i--)
            sprintf(s, "%s%09d", s, _data[i]);
    }

    std::string ToString() const
    {
        char *buff = (char*)malloc(20);

        sprintf(buff, "%d", _data.empty() ? 0 : _data.back());
        std::string res = buff;

        for(int i = (int)_data.size() - 2; i >= 0; i--)
        {
            sprintf(buff, "%09d", _data[i]);
            res += buff;
        }

        free(buff);

        return res;
    }

    friend const BigInteger operator+(BigInteger &i);
    friend const BigInteger& operator++(BigInteger &i);
    friend const BigInteger& operator--(BigInteger &i);
    friend const BigInteger operator++(BigInteger &i, int);
    friend const BigInteger operator--(BigInteger &i, int);

    friend const BigInteger operator+(const BigInteger &c, const BigInteger &b);
    friend const BigInteger operator-(const BigInteger &c, const BigInteger &b);
    friend const BigInteger operator*(const BigInteger &a, const BigInteger &b);
    friend const BigInteger operator/(const BigInteger &a, const BigInteger &b);
    friend const BigInteger operator%(const BigInteger &a, const BigInteger &b);

    friend BigInteger& operator+=(BigInteger &a, const BigInteger &b);
    friend BigInteger& operator-=(BigInteger &a, const BigInteger &b);
    friend BigInteger& operator*=(BigInteger &a, const BigInteger &b);
    friend BigInteger& operator/=(BigInteger &a, const BigInteger &b);
    friend BigInteger& operator%=(BigInteger &a, const BigInteger &b);

    friend bool operator==(const BigInteger &a, const BigInteger &b);
    friend bool operator<=(const BigInteger &a, const BigInteger &b);
    friend bool operator>=(const BigInteger &a, const BigInteger &b);
    friend bool operator<(const BigInteger &a, const BigInteger &b);
    friend bool operator>(const BigInteger &a, const BigInteger &b);
    friend bool operator!=(const BigInteger &a, const BigInteger &b);

    /*operator long long() const
    {
        long long res = 0, b = 1;
        for(size_t i = 0; i < _data.size(); i++)
        {
            res += b * _data[i];
            b *= BigInteger::_base;
        }
        return res;
    }

    operator unsigned long long()
    {
        unsigned long long res = 0, b = 1;
        for(size_t i = 0; i < _data.size(); i++)
        {
            res += b * _data[i];
            b *= BigInteger::_base;
        }
        return res;
    }*/

    friend std::istream& operator>>(std::istream &is, BigInteger &i)
    {
        std::string s;
        is >> s;
        i = BigInteger(s);
        return is;
    }

    friend std::ostream& operator<<(std::ostream &os, const BigInteger &i)
    {
        os << i.ToString();
        return os;
    }

private:
    static const int _base = 1000 * 1000 * 1000;
    std::vector<int> _data;

    int _cmp(const BigInteger &a, const BigInteger &b) const //a - b, 1 if a > b
    {
        if(a._data.size() > b._data.size()) return 1;
        if(a._data.size() < b._data.size()) return -1;

        for(int i = (int)a._data.size() - 1; i >= 0; i--)
        {
            if(a._data[i] > b._data[i]) return 1;
            if(a._data[i] < b._data[i]) return -1;
        }

        return 0;
    }

    BigInteger _div_short(const BigInteger &c, int b, int &mod) const
    {
        mod = 0;
        BigInteger a = c;
        for(int i = (int)a._data.size() - 1; i >= 0; i--)
        {
            long long cur = a._data[i] + mod * 1ll * BigInteger::_base;
            a._data[i] = int(cur / b);
            mod = int(cur % b);
        }

        while (a._data.size() > 1 && a._data.back() == 0)
            a._data.pop_back();

        return a;
    }

    bool _is_zero() const
    {
        return _data.size() == 1 && _data[0] == 0;
    }
};

const BigInteger operator+(const BigInteger &i)
{
    return BigInteger(i);
}

const BigInteger& operator++(BigInteger &i)
{
    int j = 0;
    i._data[0]++;

    while(i._data[j] >= BigInteger::_base)
    {
        if(j == (int)i._data.size() - 1) i._data.push_back(1); else i._data[j + 1]++;
        i._data[j] -= BigInteger::_base;
        j++;
    }

    return i;
}

const BigInteger operator++(BigInteger &i, int)
{
    BigInteger old = BigInteger(i);

    int j = 0;
    i._data[0]++;

    while(i._data[j] >= BigInteger::_base)
    {
        if(j == (int)i._data.size() - 1) i._data.push_back(1); else i._data[j + 1]++;
        i._data[j] -= BigInteger::_base;
        j++;
    }

    return old;
}

//TODO: Optimize
const BigInteger& operator--(BigInteger &i)
{
    if(!i._is_zero()) i = i - 1;
    return i;
}

//TODO: Optimize
const BigInteger operator--(BigInteger &i, int)
{
    BigInteger old = BigInteger(i);
    if(!i._is_zero()) i = i - 1;
    return old;
}

const BigInteger operator+(const BigInteger &c, const BigInteger &b)
{
    BigInteger a = c;

    int carry = 0;
    for(size_t i = 0; i < std::max(a._data.size(), b._data.size()) || carry; i++)
    {
        if(i == a._data.size()) a._data.push_back(0);
        a._data[i] += carry + (i < b._data.size() ? b._data[i] : 0);
        carry = a._data[i] >= BigInteger::_base;
        if(carry) a._data[i] -= BigInteger::_base;
    }

    return a;
}

const BigInteger operator-(const BigInteger &c, const BigInteger &b)
{
    if(c < b) throw std::invalid_argument("a - b, a must b greater or equal zero");
    BigInteger a = c;

    int carry = 0;
    for(size_t i = 0; i < b._data.size() || carry; i++)
    {
        a._data[i] -= carry + (i < b._data.size() ? b._data[i] : 0);
        carry = a._data[i] < 0;
        if(carry) a._data[i] += BigInteger::_base;
    }

    while(a._data.size() > 1 && a._data.back() == 0)
        a._data.pop_back();

    return a;
}

const BigInteger operator*(const BigInteger &a, const BigInteger &b)
{
    BigInteger c;
    c._data.resize(a._data.size() + b._data.size());

    for(size_t i = 0; i < a._data.size(); i++)
        for(int j = 0, carry = 0; j < (int)b._data.size() || carry; j++)
        {
            long long cur = c._data[i + j] + a._data[i] * 1ll * (j < (int)b._data.size() ? b._data[j] : 0) + carry;
            c._data[i + j] = int(cur % BigInteger::_base);
            carry = int(cur / BigInteger::_base);
        }

    while(c._data.size() > 1 && c._data.back() == 0)
        c._data.pop_back();

    return c;
}

//TODO: Division by zero
const BigInteger operator/(const BigInteger &a, const BigInteger &b)
{
    if(b._is_zero()) throw std::invalid_argument("division by zero");
    BigInteger l = 0, r = a + 1, m;
    int t;
    while(r - l > 1)
    {
        //m = (r + l) / 2;
        m = a._div_short(r + l, 2, t);
        if(b * m <= a) l = m; else r = m;
    }
    return l;
}

//TODO: Division by zero
const BigInteger operator%(const BigInteger &a, const BigInteger &b)
{
    if(b._is_zero()) throw std::invalid_argument("division by zero");
    BigInteger l = 0, r = a + 1, m;
    int t;
    while(r - l > 1)
    {
        //m = (r + l) / 2;
        m = a._div_short(r + l, 2, t);
        if(b * m <= a) l = m; else r = m;
    }
    return a - b * l;
}

BigInteger& operator+=(BigInteger &a, const BigInteger &b)
{
    int carry = 0;
    for(size_t i = 0; i < std::max(a._data.size(), b._data.size()) || carry; i++)
    {
        if(i == a._data.size()) a._data.push_back(0);
        a._data[i] += carry + (i < b._data.size() ? b._data[i] : 0);
        carry = a._data[i] >= BigInteger::_base;
        if(carry) a._data[i] -= BigInteger::_base;
    }
    return a;
}

BigInteger& operator-=(BigInteger &a, const BigInteger &b)
{
    int carry = 0;
    for(size_t i = 0; i < b._data.size() || carry; i++)
    {
        a._data[i] -= carry + (i < b._data.size() ? b._data[i] : 0);
        carry = a._data[i] < 0;
        if(carry) a._data[i] += BigInteger::_base;
    }

    while(a._data.size() > 1 && a._data.back() == 0)
        a._data.pop_back();

    return a;
}

BigInteger& operator*=(BigInteger &a, const BigInteger &b)
{
    a = a * b;
    return a;
}

BigInteger& operator/=(BigInteger &a, const BigInteger &b)
{
    a = a / b;
    return a;
}

BigInteger& operator%=(BigInteger &a, const BigInteger &b)
{
    a = a % b;
    return a;
}

bool operator==(const BigInteger& a, const BigInteger& b)
{
    return a._cmp(a, b) == 0;
}

bool operator<=(const BigInteger& a, const BigInteger& b)
{
    return a._cmp(a, b) <= 0;
}

bool operator>=(const BigInteger& a, const BigInteger& b)
{
    return a._cmp(a, b) >= 0;
}

bool operator<(const BigInteger& a, const BigInteger& b)
{
    return a._cmp(a, b) < 0;
}

bool operator>(const BigInteger& a, const BigInteger& b)
{
    return a._cmp(a, b) > 0;
}

bool operator!=(const BigInteger& a, const BigInteger& b)
{
    return a._cmp(a, b) != 0;
}

BigInteger binpow (BigInteger a, BigInteger n)
{
  if (n == 0)
  return 1;
  if (n % 2 == 1)
  return binpow (a, n-1) * a;
   else {
     BigInteger b = binpow (a, n/2);
     return b * b;
  }
}

BigInteger gcd (BigInteger a, BigInteger b) {
 if (b == 0)
  return a;
 else
  return gcd (b, a % b);
}
BigInteger sum(BigInteger a)
{
    BigInteger o;
    while (a!=-1)
    {
        o+=a;
        a--;
    }
    return o;
}
#define FORN(i,n) for (int i=0;i<n;i++)
#define ll long long
BigInteger pows(BigInteger x,BigInteger y)
{
    BigInteger q=1;
    for(BigInteger i=0;i<y;i++)
    q*=x;
    return q;
}
BigInteger abss(BigInteger x)
{
    if(x<0)
    x-=x;
    return x;
}

//ll Min=1000000000000000000;
//ll Max=-Min;

BigInteger fa(BigInteger k,BigInteger n)
{
    BigInteger q=k;
    for(BigInteger i=k+1;i<n+1;i++)
    {
        q*=i;
    }
    return q;
}

int main()
{
    ll n,m,k;
    cin>>n>>m>>k;
    if(k==0)
    {
        cout<<m;
        return 0;
    }
    ll **mas=new ll *[2001];
    repl(i,0,2000)
    {
        mas[i]=new ll[i+1];
        repl(j,0,i+1)
        {
            if(j==0 || j==i)
            {
                mas[i][j]=1;
            }
            else
            {
                mas[i][j]=(mas[i-1][j]+mas[i-1][j-1])%998244353;
            }
        }
    }
    BigInteger tur=(pows(m-1,k)*m)%998244353;
    //cout<<mas[n-1][k]<<endl<<tur<<endl<<endl;
    cout<<((mas[n-1][k]*tur)%998244353);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define what_is(x) cerr << #x << " is " << x << endl;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
typedef long long ll;
const int N = 2e3+5;
const int INF = 1e9;
const int MOD = 998244353;
#define int ll

int n, m, k;
int dp[N][N];
int pow(int x, int y){
	int ans = 1LL;
	while(y--){
		ans *= x;
		ans %= MOD;
	}
	return ans;
}
int32_t main()
{
	IOS
	//freopen("input.txt", "r", stdin);
	cin >> n >> m >> k;
	int fact[N], fact_inv[N], inv[N];
	inv[1] = 1;
	for(int i=2; i<N; i++) {
		inv[i] = MOD - (MOD/i)*inv[MOD%i] % MOD;
	}
	fact[0] = fact_inv[0] = 1;
	for(int i=1; i<N; i++){
		fact[i] = i*fact[i-1] % MOD;
		fact_inv[i] = fact_inv[i-1]*inv[i] % MOD;
	}
	auto comb = [&](int n, int k){
		if (n<0 || k<0 || n < k) return 0LL;
		return fact[n]*fact_inv[n-k] % MOD *fact_inv[k] % MOD;
	};
	int ans = comb(n-1, k)*m % MOD*pow(m-1, k) % MOD;
	cout << ans << endl;

	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll mod = (ll)998244353;
const int N = 2005;
ll n, m, k;
ll dp[N][N];

ll solve(ll cur, ll sisa) {
	if (cur == n) {
		if (sisa == 0) return 1LL;
		else return 0LL;
	}
	if (cur > n) return 0LL;
	if (sisa < 0LL) return 0LL;
	ll &ret = dp[cur][sisa];
	if (ret != - 1LL) return ret;

	ret = 0LL;
	ret = (ret + solve(cur+1LL, sisa)) %mod;
	if (sisa > 0LL) ret = (ret + solve(cur+1LL, sisa-1LL)) %mod;

	return ret;
}

ll fe(ll x, ll y) {
	if (y == 0LL) return 1LL;
	else if (y == 1LL) return x;
	ll ret = fe(x, y/2LL) %mod;
	ret = (ret*ret) %mod;
	if (y&1LL) ret = (ret*x) %mod;
	return ret;
}

ll npr(ll x, ll y) {
	ll ret = 1LL;
	for (ll i = x; i > 1; i--)
		ret = (ret*i) %mod;
	for (ll i = 2LL; i <= x-y; i++)
		ret = (ret * fe(i, mod-2LL)) %mod;
	return ret;
}

ll calc(ll x, ll y) {
	ll ret = x;
	for (ll i = 0; i < y; i++) {
		ret *= (x-1LL);
		ret %= mod;
	}
	return ret;
}

int main() {
	scanf("%I64d %I64d %I64d", &n, &m, &k);
	memset(dp, -1LL, sizeof dp);
	ll x = solve(1LL, k) %mod;
	// printf(">> x=%lld\n", x);
	ll ans = (calc(m, k) * x) %mod;

	printf("%I64d\n", ans);

	return 0;
}

//#include <bits/stdc++.h>
//#define LL long long
//#define INF 0x3f3f3f3f
//using namespace std;
//int n, arr[100005];
//int main()
//{
//    while(~scanf("%d",&n)) {
//        map <int,int> mp, ans;
//        mp.clear(); ans.clear();
//        for(int i=0;i<n;i++) {
//            int t; scanf("%d",&t);
//            if(!mp.count(t)) mp[t]=1;
//            else mp[t]++;
//            arr[i]=t;
//        }
//        map <int,int> :: iterator it;
//        bool OK=1;
//        for(it=mp.begin();it!=mp.end();it++) {
//            int a=(*it).first, b=(*it).second;
//            if(a+b!=n) {
//                int t=2;
//                while(b/t)
//                    if(b%t==0 && a+(b/t)==n) break;
//                    else t++;
//                if(b%t==0) {
//                    for(int i=0;i<t;i++) ans[b/t]++;
//                } else {
//                    OK=0; break;
//                }
//            }
//            else ans[b]++;
//        }
//        if(OK) {
//            printf("Possible\n");
//            int c=1;
//            for(it=ans.begin();it!=ans.end();it++) {
//                int a=(*it).first, b=(*it).second;
//                while(b--) {
//                    for(int i=0;i<a;i++)
//                        printf("%d ",c);
//                    c++;
//                }
//            } printf("\n");
//        } else printf("Impossible\n");
//    }
//
//    return 0;
//}
#include <bits/stdc++.h>
#define LL long long
#define mod 998244353
using namespace std;
LL n,m,k;
LL dp[2005][2005];
LL mod_pow(LL x,LL n) {
    LL res=1LL;
    while(n) {
        if(n&1) res=res*x%mod;
        x=x*x%mod;
        n>>=1;
    } return res%mod;
}
int main()
{
    while(~scanf("%I64d%I64d%I64d",&n,&m,&k)) {
        memset(dp,0,sizeof(dp));
        for(int i=1;i<=n;i++) dp[i][0]=1LL;
        for(int i=2;i<=n;i++)
            for(int j=1;j<i && j<=k;j++)
                dp[i][j]=(dp[i-1][j]+dp[i-1][j-1])%mod;
        LL one=1LL*m*mod_pow(m-1LL,k)%mod;
        printf("%I64d\n",one*dp[n][k]%mod);
    }

    return 0;
}

// Harry Potter
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll p=998244353;int n,m,k,i=1,j;ll d[2001][2001];
int main(){
	scanf("%d%d%d",&n,&m,&k);
 	for(i = 1; i <= n; i ++)
		for(d[i][0]=m,j=1;j<=k;j++)
			(d[i][j]=d[i-1][j]+(d[i-1][j-1]*(m*1ll-1)))%=p;
	cout<<d[n][k];}

#include <bits/stdc++.h>
#define MOD 998244353
using namespace std;
//(n-1)Ck*m*(m-1)^k
long long int power(long long int x,long long int y,long long int p)
{
    long long int res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;

        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
long long int fact(long long int x)
{
    long long int res=1;
    for(long long int i=1;i<=x;i++)
    res=(res*i)%MOD;
    return res;
}
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long long int n,m,k;cin>>n>>m>>k;
    if(k==0)
    {
        cout<<m;return 0;
    }
    if(n==1)
    {
        if(k==0){cout<<1;return 0;}
        else {cout<<0;return 0;}
    }
    if(n<=k)
    {
        cout<<0;return 0;
    }
    long long int y=((fact(n-1)*power(fact(k),MOD-2,MOD))%MOD*power(fact(n-1-k),MOD-2,MOD))%MOD;
    cout<<(((y*power(m-1,k,MOD))%MOD)*m)%MOD;

	return 0;
}

/// In the name of God ///
#include<bits/stdc++.h>
#define PRIME bool ok(ll x) {ll i ;for(i = 2 ; i * i <= x ; i ++){if(x % i == 0){return 0;}}return 1 ;}
#define MYPOW ll f(ll x, ll y){ll i, s = 1 ;for(i = 1 ; i <= y ; ++ i){s *= x ;}return s ;}
#define DFS vector < ll > v[cs] ; ll us[cs], k ;void dfs(ll x){us[x] = 1 ;k ++ ;for(auto to : v[x]){if(!us[to]){dfs(to) ;}}}
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define sz size
#define se second
#define fr first
#define cs 1001000
#define stt string
#define INF 1000000007
#define MOD 998244353
#define sc 300200
#define LETS_GO_TEST PRIME  MYPOW  DFS
#define ios ios_base::sync_with_stdio(false);
using namespace std ;

/**-------**////LETS_GO_TEST////**-------**/

ll n, m, k, i, ans , w, sh = 1, x, j, z = 1, dp[2222][2222];
int main()
{
    cin >> n >> m >> k ;
    dp[1][0] = m ;
    for(i = 2 ; i <= n ; ++ i)
    {
        for(j = 0 ; j <= min(i, k) ; ++ j)
        {
            dp[i][j] = (dp[i][j] + (dp[i - 1][j - 1] * (m - 1)) % MOD) % MOD;
            dp[i][j] = (dp[i][j] + dp[i - 1][j]) % MOD;
        }
    }
    cout << dp[n][k] ;
}

// Harry Potter
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll p=998244353;int n,m,k;ll d[2001][2001];
int main(){
	scanf("%d%d%d",&n,&m,&k);
	d[1][0]=m*1ll;
 	for(int i = 2; i <= n; i ++){
		d[i][0]=m*1ll;
		for(int j=1;j<=k;j ++)
			(d[i][j]=d[i-1][j]+(d[i-1][j-1]*(m*1ll-1ll))%p)%=p;
	}
	cout << d[n][k];}

/*
    TOP GUN: MAVERICK!!
                                */
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//#include <boost/functional/hash.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int lli;
lli mod=998244353;
lli INF=1e17;
#define sqr(x) (x) * (x)
#define bip(n) __builtin_popcountll(n)//no of ones bit in binary!!
#define bictz(n) __builtin_ctzll(n)//no of trailing zeroes in binary!!
#define biclz(n) __builtin_clzll(n)//no of leading zeroes in binary!!
#define bffs(n) __builtin_ffsll(n)//index of first one bit!!
typedef pair<lli,lli> ll;
#define mem1(a,x) fill(&a[0], &a[0] + sizeof(a) / sizeof(a[0]), x)
#define mem2(a,x) fill(&a[0][0], &a[0][0] +sizeof(a)/sizeof(a[0][0]),x)
#define mem3(a,x) fill(&a[0][0][0], &a[0][0][0] +sizeof(a)/sizeof(a[0][0][0]),x)
#define fi1 ifstream fin("input.txt")
#define of1 ofstream fout("output.txt")
int fmx(int x, int y) { return (((y-x)>>(31))&(x^y))^y; }
int fmi(int x, int y) { return (((y-x)>>(31))&(x^y))^x; }
typedef tree<lli,null_type,less<lli>,rb_tree_tag,tree_order_statistics_node_update> ost;
lli n,q,z,y,k,m;
const double pi1=3.14159265358979323846;
//matrix exponentiation is associative and distributive
lli me(lli a,lli b)
{
    lli res=1;
    while(b)
    {
        if(b&1)
        res=(res%mod*a%mod)%mod;
        a=a*a;
        a%=mod;
        b=b>>1;
    }
    return res;
}
lli dp[2005][2005];
int main()
{
    ios_base::sync_with_stdio(0);
    cin>>n>>m>>k;
    mem2(dp,0);
    for(int i=0;i<=n;i++)
    {
        dp[i][0]=1;
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=i;j++)
        {
            dp[i][j]=(dp[i-1][j-1]+dp[i-1][j])%mod;
        }
    }
    // cout<<dp[2][1]<<"\n";
    lli dd=(dp[n-1][k]%mod*m%mod*me(m-1,k))%mod;
    cout<<dd;
    // cout << a.a[0][0] << " " <<a.a[0][1] << " " << a.a[1][0] << " " << a.a[1][1] <<"\n";
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const ll mod = 998244353;

int n, m, k;

ll res = 1ll, frac[2005], inv[2005];

int read()
{
	int x = 0, fl = 1; char ch = getchar();
	while (ch < '0' || ch > '9') { if (ch == '-') fl = -1; ch = getchar();}
	while (ch >= '0' && ch <= '9') {x = (x << 1) + (x << 3) + ch - '0'; ch = getchar();}
	return x * fl;
}

ll qpow(ll base, ll p)
{
	ll rs = 1ll;
	while (p)
	{
		if (p & 1ll) rs = rs * base % mod;
		base = base * base % mod;
		p >>= 1ll;
	}
	return rs;
}

int main()
{
	n = read(); m = read(); k = read();
	frac[0] = inv[0] = 1ll;
	for (int i = 1; i <= 2000; i ++ )
		frac[i] = 1ll * frac[i - 1] * i % mod;
	inv[2000] = qpow(frac[2000], mod - 2);
	for (int i = 1999; i >= 1; i -- )
		inv[i] = 1ll * inv[i + 1] * (i + 1) % mod;
	res = 1ll * frac[n - 1] % mod * inv[k] % mod * inv[n - 1 - k] % mod * m % mod * qpow((ll)(m - 1), (ll)(k)) % mod;
	printf("%lld\n", res);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

long long mod = 998244353;

long long inv(long long x){
  long long res = 1;
  long long k = mod - 2;
  long long y = x;
  while(k){
    if(k&1)res = (res*y)%mod;
    y = (y*y) % mod;
    k /= 2;
  }
  return res;
}

long long c(int n,int k){
   long long ret = 1;

  for(int i = n-k+1;i <= n;i++){
    ret = (ret*i) % mod;
  }
  long long d = 1;
  for(int i = 2;i <= k;i++){
    d = (d*i)%mod;
  }
  ret = (ret*inv(d))%mod;

  return ret;
}

int main(){
  int n, m, k;

  cin >> n >> m >> k;

  long long ret = c(n-1,k);

  for(int i = 0;i < k+1 ;i++){
    ret = (ret*max(m-i,m-1))%mod;
  }

  cout << ret << endl;
}

#include<bits/stdc++.h>
#define inf 2139062143
#define MAXN 2010
#define MOD 998244353
#define ll long long
#define ull unsigned long long
#define rep(i,s,t) for(register int i=(s),i##end=(t);i<=i##end;++i)
#define dwn(i,s,t) for(register int i=(s),i##end=(t);i>=i##end;--i)
#define ren for(int i=fst[x];i;i=nxt[x])
using namespace std;
inline int read()
{
	int x=0,f=1;char ch=getchar();
	while(!isdigit(ch)) {if(ch=='-') f=-1;ch=getchar();}
	while(isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	return x*f;
}
int n,m,k,dp[MAXN][MAXN];
int main()
{
	//freopen("brackets.in","r",stdin);
	//freopen("brackets.out","w",stdout);
	n=read(),m=read(),k=read();rep(i,1,n) dp[i][0]=m;
	rep(i,2,n) rep(j,1,min(k,i-1)) dp[i][j]=(1LL*dp[i-1][j-1]*(m-1)+dp[i-1][j])%MOD;
	printf("%d\n",dp[n][k]);
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 998244353

long long fast_expo(ll a,ll k)
{
	if(k==0)return 1;
	ll logk = ceil(float(log2(k)));
	ll expo[logk+1];
	expo[0]=a;
	for(ll i=1;i<=logk;i++)
	{
		expo[i]=(expo[i-1]*expo[i-1])%mod;
	}
	ll ans=1;
	for(ll  i=0;i<=logk;i++)
	{
		if( k & (1<<i) )
		{
			ans = (ans%mod * expo[i]%mod) % mod;
		}
	}
	return ans;
}

ll mod_inverse(ll n)
{
	return fast_expo(n,mod-2);
}

int main()
{
	ll n,m,k;
	cin>>n>>m>>k;
	ll fact[n+1];
	fact[0]=1;
	for(ll i=1;i<=n;i++)
	{
		fact[i] = (fact[i-1]%mod*i)%mod;
	}
	ll inverse_factorial[n+1]; // i*(i-1)! = i! => i^-1 * (i-1)^-1 = (i!)^-1
	inverse_factorial[n] = mod_inverse(fact[n]);
	for(ll i=n-1;i>=0;i--)
	{
		inverse_factorial[i] = ((i+1) * inverse_factorial[i+1] ) %mod;
	}
	long long ans = (fact[n-1]%mod * inverse_factorial[n-1-k]%mod * (inverse_factorial[k])%mod )%mod;
	ans  = (ans%mod * m%mod  * fast_expo(m-1,k)%mod)%mod ;
	cout<<ans<<endl;
}

#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()

typedef long long ll;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef long double ld;

template <typename T1, typename T2> inline void chkmin(T1 &x, T2 y) { if (y < x) x = y; };
template <typename T1, typename T2> inline void chkmax(T1 &x, T2 y) { if (y > x) x = y; };

const int MOD = 998244353;
int add(int x, int y) {
    x += y;
    if (x >= MOD) x -= MOD;
    if (x < 0) x += MOD;
    return x;
}
int mult(int x, int y) {
    return (x * (ll)y) % MOD;
}

const int N = 2003;
int dp[N][N];

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
#ifdef DEBUG
    freopen("in", "r", stdin);
#endif

    int n, m, k;
    cin >> n >> m >> k;

    dp[1][0] = 1;
    for (int i = 2; i <= n; ++i) {
        dp[i][0] = dp[i - 1][0];
        for (int j = 1; j <= k; ++j) {
            dp[i][j] = add(mult(m - 1, dp[i - 1][j - 1]), dp[i - 1][j]);
        }
    }
    cout << mult(m, dp[n][k]) << '\n';

    return 0;
}

#include <bits/stdc++.h>
#define MOD 998244353
using namespace std;
long long dp[2004][2004] , n , m , k;
int main()
{
    int i , j;
    cin >> n >> m >> k;
    dp[1][1] = m;
    for(i = 2; i <= n; i++)
        for(j = 1; j <= n; j++)
            dp[i][j] = (dp[i - 1][j] + (m - 1)*dp[i - 1][j - 1] % MOD) %MOD;
    cout << dp[n][k + 1]<< "\n";
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
typedef pair<ll , ll> PLL;
typedef long double ld;

#define pb push_back
#define all(c) c.begin(),c.end()
#define allr(c) c.rbegin(),c.rend()
#define mod 998244353
#define PI 3.14159265
#define endl '\n'
#define MAX 3001

inline int add(int x, int y){ x += y; if(x >= mod) x -= mod; return x;}
inline int sub(int x, int y){ x -= y; if(x < 0) x += mod; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % mod;}
inline int powr(int a, ll b){
	int x = 1 % mod;
	while(b){
		if(b & 1) x = mul(x, a);
		a = mul(a, a);
		b >>= 1;
	}
	return x;
}
inline int inv(int a){ return powr(a, mod - 2);}

int fac[MAX];

void pre() {
    fac[0] = 1;
    for (int i = 1; i < MAX; i++)
        fac[i] = mul(fac[i - 1] , i);
}

int nCr(int n, int r)
{
    if (r > n) return 0;
    if (r == 0) return 1;
    ll ans = mul(fac[n] , inv(fac[r]));
    ans = mul(ans , inv(fac[n - r]));
    return ans;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    pre();
    int n, m, k;
    cin >> n >> m >> k;
    if (k == 0) {
        cout << m << endl;
        return 0;
    }
    int p = n - 1;
    int c = nCr(p, k);
    int color = mul(m, powr(m - 1, k));
    int ans = mul(color, c);
    cout << ans << endl;

    return 0;
}

#include <bits/stdc++.h>
#define MOD 998244353
using namespace std;

static long long int facArr[2000];

long long int fac(int n){

    if(facArr[n] > 0)
        return facArr[n];

    //build fac table
    for(int i = 1; i <= n ; i++){
        facArr[i] = (i * facArr[i-1]) %MOD ;
    }

    return facArr[n];
}

long long int power(int m, int k){
    //this means we have 1 * k times of m
    //if k is odd, we will multiply with m one time
    //then we will do m*m, so that the number of m decreases by half. Which means k = k/2;
    //x and 3 times x^2 . result has already taken the x
    //m == x^2, k == 3
    //result will take x^2 again.
    //m == x^4, k == 1
    //k will take x^4, k will become 0
    //every number divided multiple times by 2 will eventually reaches 1.
    //Proof? Convert the number to binary, and the leading 1 will eventually reaches 1 * 2^0
    //which proves that this algorithm will work at base case

    //k = x * x * x * x * x;
    //k = (x * x) * (x * x) * x;
    //k = (x%MOD * x%MOD)%MOD   *   (x%MOD * x%MOD)%MOD     *       x%MOD
    long long int x = m; // I have swapped out the m because m is an int
    long long int result = 1;
    while(k > 0){
        if(k & 1)
            //result = (result%MOD * m%MOD)%MOD;
            result = (result * x)%MOD;

        //m = (m%MOD * m%MOD)%MOD;
        //m = (m * m)%MOD;
        x = (x * x)%MOD;
        k /= 2;
    }

    return result;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    facArr[0] = 1;

    int n, m, k;
    cin >> n >> m >> k;
    if(k == 0){
        cout << m << endl;
        return 0;
    }

    long long int ans;
    long long int part1 = (m * power(m-1, k)) % MOD;
    //long long int part2 = fac(n-1) / ((fac(k) * fac(n-1-k))%998244353);

    // let a = fac(n-1)     and        b = fac(k) * fac(n-1-k)
    // we are dealing with (a/b)%MOD    !=    (a%MOD / b%MOD)%MOD
    // part2 = (a/b)%MOD = (a%MOD * b^(-1)%MOD)%MOD =  (a%MOD * (b^(MOD-2))%MOD)%MOD
    // b^(-1)%MOD = (b^(MOD-2))%MOD
    long long int part2 = (fac(n-1) * power((fac(k) * fac(n-1-k))%MOD, MOD-2))%MOD;

    //cout << "part1 " << part1 << endl;
    //cout << "part2 " << part2 << endl;

    ans = (part1 * part2)%MOD;
    cout << ans << endl;

    return 0;
}

	# include <bits/stdc++.h>
	#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
	#define endl "\n"
	#define ll long long
	#define md 998244353

	using namespace std;

	ll modexp(ll x, ll y)
	{
		ll res = 1;
		x %= md;
		while(y > 0)
		{
			if(y & 1)
				res = (res * x) % md;
			y = y >> 1;
			x = (x * x) % md;
		}
		return res;
	}

	ll inv(ll a, ll p)
	{
		return modexp(a, p - 2);
	}

	ll getnck(ll n, ll k)
	{
		k = min(k, n - k);
		ll ans = 1;
		for(int i = 1; i <= k; i++)
			ans = ((ans * (n - i + 1)) % md) * inv(i, md) % md;
		return ans;
	}

	int main()
	{
		IOS;
		int n, m, k;
		cin >> n >> m >> k;
		ll ans = (((m * getnck(n - 1, k)) % md) * modexp(m - 1, k)) % md;
		cout << ans;
		return 0;
	}

#include <bits/stdc++.h>\

using namespace std;
#define int long long
#define S second
#define F first
#define endl '\n'
#define strt {0,0}
#define pb push_back
#define mk make_pair
#define pii pair<int,int>
#define vpii vector< pair<int,int> >
const int N = 2010;
const int INF = INT_MAX;
const int MOD = 998244353;

int c[N][N];

int32_t main(){
    int n, m, k; cin >> n >> m >> k;
    int ans = m;
    for (int i = 0 ; i < N ; i++){
		c[i][0] = c[i][i] = 1;
		for (int j = 1 ; j < i ; j++) c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % MOD;
    }
    //if(m == 1) return cout << 1, 0;
    ///cout << c[n - 1][k]
    for(int i = 1 ; i <= k ; i++){
        ans *= (m - 1);
        ans %= MOD;
    }
    //cout << ans << " ";
    //cout << c[1][3] << " ";
    if(k == 0)return cout << m, 0;
    cout << (c[n - 1][k] * ans) % MOD;
    return 0;
}

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;

#define TRACE

#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif

#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define fill(a)  memset(a, 0, sizeof (a))
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

void pre(){

}

void solve(){

}
vector<int> s[400009];
struct UF {
		vi e;
		UF(int n) : e(n, -1) {}
		bool same_set(int a, int b) { return find(a) == find(b); }
		int size(int x) { return -e[find(x)]; }
		int find(int x) { return e[x] < 0 ? x : e[x] = find(e[x]); }
		void join(int a, int b) {
			a = find(a), b = find(b);
			if (a == b) return;
			if (e[a] > e[b]) swap(a, b);
			e[a] += e[b]; e[b] = a;
		}
};
/*pre();
	int n,m,q;cin>>n>>m>>q;
	rep(i,q){
		int r,c;cin>>r>>c;
		s[r].pb(n+c);
		s[n+c].pb(r);
	}
	UF dsu(n+m+1);
	repA(i,1,n+m){
		trav(j,s[i]) dsu.join(s[i][0],j);
	}
	int ans=0;
	repA(i,1,n+m) if(dsu.find(i)==i) ans++;
	repA(i,1,n) if(dsu.find(i)==i&&sz(s[i])!=0) ans--;
	ans--;
	cout<<ans;*/
ll dp[2002][2002];
ll p=998244353;
void fun(void){
	for(int i=1;i<2001;i++){
		for(int j=0;j<=i;j++){
			if(j==1)dp[i][j]=i;
			else if(j==0 || j==i)dp[i][j]=1;
			else{
				dp[i][j]=(dp[i-1][j-1]+dp[i-1][j])%p;
			}
		}
	}
}
ll _pow(ll a,ll b){
	ll c=1,d,e,f;
	if(b==0)return 1;
	else{
		while(b>0){
			if(b%2!=0)c=(c*a)%p;
			a=(a*a)%p;
			b/=2;
		}
	}
	return c;
}
int main() {
	cin.sync_with_stdio(0); cin.tie(0);
	cin.exceptions(cin.failbit);
	ll n,m,k;
	ll a=0,b,c,d,e,f;
	cin>>n>>m>>k;
	ll ans=0;
	dp[0][0]=1;
	fun();
	d=min(m,k+1);
//	b=dp[m][d];
	c=_pow(m-1,k)%p;
	a=(1*c)%p;
	//cout<<b<<" "<<c<<" "<<a<<endl;
	a=(a*(m))%p;
	a=(a*dp[n-1][k])%p;
	cout<<a;
	return 0;
}

#include <stdio.h>
#include <iostream>
#include <string>
#include <string.h>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <cmath>
#include <vector>
#pragma warning(disable:4996)
using namespace std;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pi;
#define For(i, a, b) for(int i=a; i<b; i++)
#define inc(i, a, b) for(int i=a; i<=b; i++)
#define dec(i, a, b) for(int i=a; i>=b; i--)

long long i, j, k, n, m, c, d, e, f, g, w, h, q, x, y, z, r[200005];
long long cb[2005][2005];
long long mod = 998244353;

long long comb(long long a, long long b) {
	if (b == 0 || a == b) return (long long) 1;
	else if (cb[a][b]) return cb[a][b];
	cb[a][b] = (comb(a - 1, b) % mod + comb(a - 1, b - 1) % mod)%mod;
	return cb[a][b];
}

long long pm(long long a ,long long b) {
	long long ret = a;
	for (i = 0; i < b-1; i++) {
		ret *= a-1;
		ret %= mod;
	}
	return ret;
}

int main() {
	cin.tie(0);
	cin >> n >> m >> k;
	cout << (comb(n - 1, k) * pm(m, k + 1))%mod;

}

#include<bits/stdc++.h>
using namespace std;

int mod = 998244353;

long long modexp(long long x, long long n)
{
    if(n==0)
    return 1;
    else if(n&1)
        return (modexp((x*x)%mod,n/2)%mod * x%mod )%mod;
    else
        return modexp((x*x)%mod,n/2)%mod;
}

long long ans(long long i, long long n, long long col, long long k, long long dp[][2010][2010])
{
    if(i==n)
    return 0;

    if(k==0)
    return 1;

    if(dp[col][i][k]!=-1)
    return dp[col][i][k]%mod;

    if(col==1)
    {
        return dp[col][i][k] = (ans(i+1,n,1,k,dp)%mod + ans(i+1,n,0,k-1,dp)%mod)%mod;
    }
    else
    {
        return dp[col][i][k] = (ans(i+1,n,0,k,dp)%mod + ans(i+1,n,1,k-1,dp)%mod)%mod;
    }
}

int main()
{
    long long n,m,k;

    cin>>n>>m>>k;

    long long dp[2][2010][2010];

    memset(dp,-1,sizeof(dp));

    long long answer = ans(0,n,0,k,dp)%mod;

    //cout<<"ANSWER "<<answer<<endl;

    long long final_answer = (answer%mod * (m%mod * modexp(m-1,k)%mod)%mod)%mod;

    cout<<final_answer<<endl;
}

#include<bits/stdc++.h>
using namespace std;
#define mod 998244353
long long int n , m , k;
long long int fact[2010] , rfact[2010];
long long int power(long long int n , long long int k)
{
    long long int res=1;
    while(k>0)
    {
        if(k&1)
        {
            res=(res*n)%mod;
        }
        n=(n*n)%mod;
        k/=2;
    }
    return res%mod;
}
int main()
{
    cin>>n>>m>>k;
    fact[0]=1;
    for(int i=1;i<=n;i++)
    {
        fact[i]=(fact[i-1]*i)%mod;
    }
    rfact[n]=power(fact[n] , mod-2);
    for(int i=n;i>0;i--)
    {
        rfact[i-1]=(rfact[i]*i)%mod;
    }
    cout<<(m*power(m-1 , k)%mod*fact[n-1]%mod*rfact[k]%mod*rfact[n-k-1]%mod)%mod;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> ii;

const int MN = 2010;
const ll mod = 998244353;
const double EPS = 1e-9;

ll c[MN][MN];

ll pot(ll b, ll e){
    if (e == 0) return 1;
    ll tmp = pot(b,e/2);
    tmp *= tmp;
    tmp %= mod;
    if (!(e & 1)){
        return (tmp)%mod;
    }
    return (tmp*b)%mod;
}

int main()
{
#ifdef acm
    freopen("a.in","r",stdin);
#else
    cin.tie(0);
    ios_base::sync_with_stdio(0);
#endif // acm

    for (int i=0; i < MN; i++){
        c[i][0] = c[i][i] = 1;
        for (int j=1; j < i; j++){
            c[i][j] = c[i-1][j-1] + c[i-1][j];
            c[i][j] %= mod;
        }
    }

    ll n, m, k;
    cin >> n >> m >> k;

    ll ans = m*(c[n-1][k]);
    ans %= mod;

    ans *= pot(m-1,k);

    cout << ans%mod << "\n";

    return 0;
}

#include<bits/stdc++.h>
#define io ios_base::sync_with_stdio(false)
#define mp make_pair
#define pb push_back
using namespace std;
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
typedef long long int ll;
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair<int,int> ii;
const int mod=998244353;
ll dp[2001], n, m, k;
ll power(ll a, ll b){
	ll ans=1;
	while(b>0){
		if(b&1) ans= ans*a %mod;
		 a= a*a % mod;
		b>>=1;
	}
	return ans;
}
ll binomial(ll nn, ll kk){
	memset(dp, 0,sizeof(dp));
	dp[0]=1;
	for(int i=1;i<=nn;i++){
		for(int j= min(i*1LL,kk);j>0;j--) dp[j]= (dp[j] +dp[j-1])%mod;
	}
 return dp[kk];

}
int main()
{
	io;
	//binomial();
	cin>>n>>m>>k;
	ll ans=0;
	if(n==1) {
		if(k==0) ans=m;
		else ans=0;
	}
	// else if(m==1){
	// 	if(k==0) ans= 1;

	// }

	if(n>1)ans= (m%mod* power(m-1, k)%mod* binomial(n-1,k)%mod)%mod;

	cout<< ans;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mod 998244353
#define max 2001

// ll ways(ll i, ll diff, ll prev){
// 	//base case
// 	if(i == n){
// 		return diff==0;
// 	}
// 	//recursive case
// 	if(dp[i][diff]!=-1){return dp[i][diff];}
// 	ll ans= (i!=0)? (ways(i+1, diff, prev))%mod: 0;
// 	for(int j=1; j<=m; j++){
// 		if(j!=prev && diff>0|| (i==0)){
// 			ans += ways(i+1,(i!=0)?diff-1:diff, j);
// 			ans %= mod;
// 		}
// 	}
// 	return dp[i][diff] = ans;
// }

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
	#endif
	ll n, m, k;
	ll dp[max][max]={0};
	cin>>n>>m>>k;
	dp[1][0]=m;
	for(int i=1; i<n; i++){
		for(int j=0; j<=k; j++){
			dp[i+1][j] += dp[i][j];
			dp[i+1][j] %= mod;
			dp[i+1][j+1] += ((m-1)*dp[i][j])%mod;
			dp[i+1][j+1] %= mod;
		}
	}
	cout<<dp[n][k];
}

#include<bits/stdc++.h>
using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pi;
typedef long long ll;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i,a,b) for (int i = a; i <= b; i++)
#define modi 998244353

ll multi(ll a, ll b){
	return ( (a%modi)*(b%modi) )%modi;
}

ll sum(ll a, ll b){
	return ( (a%modi)+(b%modi) )%modi;
}

ll calc(ll a, ll b){

	ll total = 1;

	ll temp = a;

	while(b){

		if(b&1){
			total = multi(total,temp);
		}

		temp = multi(temp, temp);
		b = b >> 1;

	}

	return total;

}

vector< vector<ll> > dp;

ll combi(ll n, ll k){

	dp[0].PB(1);

	for(ll i = 1; i <= 2000; i++){

		dp[i].PB(1);

		for(ll i2 = 1; i2 <= i-1; i2++){

			dp[i].PB( sum(dp[i-1][i2-1], dp[i-1][i2] ) );

		}

		dp[i].PB(1);

	}

	return dp[n][k];

}

int main(){

	ios::sync_with_stdio(0); cin.tie(0);

	ll n,m,k;

	cin >> n >> m >> k;

	if(k == 0){
		cout << m << endl;
		return 0;
	}

	dp.assign(2010, vector<ll>() );

	ll colors = multi( calc(m-1, k), m );

	ll manners = combi(n-1, k);

	ll res = multi(colors, manners);

	cout << res << endl;

	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>

using namespace std;
using std::cout;
using std::cin;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;
ll MOD = 998244353;
int main() {
    ll n, m, k;
    cin >> n >> m >> k;
    ll bricks[n+1][k+1];
    for(int i = 0; i < n+1; i++){
        for(int c = 0; c < k+1; c++){
            bricks[i][c] = 0;
        }
    }
    bricks[1][0] = m;
    for(int i = 2; i <= n; i++){
        bricks[i][0] = m;
        for(int c = 1; c <= k; c++){
            bricks[i][c] = ((bricks[i-1][c-1] * (m-1)) % MOD + bricks[i-1][c] % MOD) % MOD;
            bricks[i][c] %= MOD;
        }
    }
    cout << bricks[n][k] << "\n";
    return 0;
}

//By UditDesai
#pragma GCC optimize ("-O2")
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define memreset(a) memset(a,0,sizeof(a))
#define testcase(t) int t;cin>>t;while(t--)
#define trav(i,v) for(auto &i: v)
#define forn(i,e) for(int i=0;i<e;++i)
#define forsn(i,s,e) for(int i=s;i<e;++i)
#define rforn(i,s) for(int i=s;i>=0;--i)
#define rforsn(i,s,e) for(int i=s;i>=e;--i)
#define bitcount(a) __builtin_popcount(a) // set bits (add ll)
#define nl cout<<'\n'
#define sp <<' '<<
#define sz(a) (int)(a.size())
#define check(x) cout << #x << " : " << (x) << endl
#define show(a) for(auto i:a) cout<<i<<" ";cout<<endl//By UditDesai
#define getcurrtime() cerr<<"Time = "<<((double)clock()/CLOCKS_PER_SEC)<<endl
#define dbgarr(v,s,e) cerr<<#v<<" = "; forsn(i,s,e) cerr<<v[i]<<", "; cerr<<endl
#define inputfile freopen("input.txt", "r", stdin)
#define outputfile freopen("output.txt", "w", stdout)

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll,ll> p64;
typedef pair<int,int> p32;
typedef pair<int,p32> p96;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<v32> vv32;
typedef vector<v64> vv64;
typedef vector<p32> vp32;
typedef vector<p64> vp64;
typedef vector<vp32> vvp32;
typedef map<int,int> m32;
const int N=2e5+5,MOD=998244353;
const ld EPS = 1e-9;

ll dp[2005][2005];
int main()
{
	fastio;
	ll n,m,k,i,j; cin>>n>>m>>k;
	forn(i,n+1) dp[i][0] = m;
	for(i=2;i<=n;i++)
	{
		for(j=1;j<=k;j++)
		{
			dp[i][j] = dp[i-1][j] + dp[i-1][j-1]*(m-1);
			dp[i][j] %= MOD;
		}
	}
	cout<<dp[n][k];
	return 0;
}

// done by me; you are mal if you see this code and if you aren't me
#include<bits/stdc++.h>
#define NFS ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
using namespace std;
typedef long long ll;
const int N = 2e3 + 5;
const int mod = 998244353;
long long a[N][N];

void gaf(int v)
{
    v --;
    return;
}

int main()
{
    NFS;
    int n , m , k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
    {
		a[i][0] = m;
	}
	for(int i = 2; i <= n; i++)
	{
		for(int j = 1; j <= min(k , i - 1); j ++)
		{
			a[i][j] = (a[i][j] + a[i - 1][j]) % mod;
			a[i][j] = (a[i][j] + (a[i - 1][j - 1] * (m - 1)) % mod) % mod;
		}
	}
	cout << a[n][k];
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define mod  998244353

long long two[2001][2001];

int f=0;

long long coun(int n, int m, int k)
{
    if(two[n][k]!=-1) return two[n][k];
//    if(f==0){
//        f=1;
//        return two[n][k]=(m%mod*coun(n, m, k)%mod)%mod;
//    }
    if(k==0) return 1;
    if(n==0) return 0;

    return two[n][k]=((((((m-1)%mod*coun(n-1, m, k-1)%mod)%mod)%mod+((coun(n-1, m, k)%mod))%mod))%mod)%mod;

}

int main()
{

    long long i, j, l, a, c, b, n, m, k;

    cin>>n>>m>>k;
    memset(two, -1, sizeof(two));

    cout<<(m%mod*coun(n-1, m, k)%mod)%mod;

    return 0;
}

#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <utility>
#include <chrono>
#include <map>
#include <random>
#include <unordered_map>
#include <iterator>
#include <fstream>
#include <numeric>
#include <functional>
#include <exception>
#include <set>
#include <queue>
#include <string_view>
#include <stack>
#include <functional>
#include <type_traits>
#include <optional>
#include <iomanip>

#ifdef _WIN32
#include <intrin.h>
#endif // _WIN32

using ll = long long;

ll buildin_one_count(ll number)
{
#ifdef _WIN32
	return __popcnt64(number);
#else
	return __builtin_popcountl(number);
#endif // _WIN32
}

template <class Container>
ll lsize(const Container& container)
{
	return static_cast<ll>(size(container));
}

#define for_in(x) for (ll i = 0; i < x; ++i)
#define for_n(i, x) for (ll i = 0; i < x; ++i)

using namespace std;

namespace segment_tree_ns
{
	template <class T, class binary_func>
	class segment_tree
	{
	public:
		segment_tree(const std::vector<T>& elems)
			: tree_(4 * size(elems)), binary_op_(binary_func{}), tree_size_(size(elems))
		{
			static_assert(
				std::is_constructible_v<std::function<T(T, T)>, binary_func>,
				"wrong binary_func arg : it must be convertible to std::function<T(T, T)>");

			build(elems, 1, 0, tree_size_ - 1);
		}

		T get_value(size_t left, size_t right) const
		{
			auto opt_value = get_value_int(1, 0, tree_size_ - 1, left, right);
			if (opt_value.has_value())
				return opt_value.value();

			throw std::runtime_error("logical error : left > right");
		}

		void update(size_t pos, T new_value)
		{
			update_int(1, 0, tree_size_ - 1, pos, new_value);
		}
	private:
		void build(const std::vector<T>& cont, size_t vertex, size_t left, size_t right)
		{
			if (left == right)
			{
				tree_[vertex] = cont[left];
			}
			else
			{
				size_t center = (left + right) / 2;
				build(cont, vertex * 2, left, center);
				build(cont, vertex * 2 + 1, center + 1, right);
				tree_[vertex] = binary_op_(tree_[vertex * 2], tree_[vertex * 2 + 1]);
			}
		}

		std::optional<T> get_value_int(size_t vertex, size_t tree_left, size_t tree_right, size_t left, size_t right) const
		{
			if (left > right)
				return std::nullopt;
			if (left == tree_left && right == tree_right)
				return tree_[vertex];
			size_t center = (tree_left + tree_right) / 2;

			auto first = get_value_int(vertex * 2, tree_left, center, left, std::min(right, center));
			auto second = get_value_int(vertex * 2 + 1, center + 1, tree_right, std::max(left, center + 1), right);
			if (first.has_value() && second.has_value())
				return binary_op_(first.value(), second.value());
			else if (first.has_value())
				return first.value();
			else
				return second.value();
		}

		void update_int(size_t vertex, size_t tree_left, size_t tree_right, size_t pos, T new_value)
		{
			if (tree_left == tree_right)
			{
				tree_[vertex] = new_value;
			}
			else
			{
				size_t center = (tree_left + tree_right) / 2;
				if (pos <= center)
					update_int(vertex * 2, tree_left, center, pos, new_value);
				else
					update_int(vertex * 2 + 1, center + 1, tree_right, pos, new_value);
				tree_[vertex] = binary_op_(tree_[vertex * 2], tree_[vertex * 2 + 1]);
			}
		}
	private:
		std::vector<T> tree_;
		const size_t tree_size_;
		std::function<T(T, T)> binary_op_;
	};

	template <class T>
	using sum_segment_tree = segment_tree<T, std::plus<T>>;

	template <class T>
	struct max_s
	{
		T operator()(T lhs, T rhs) const { return std::max<T>(lhs, rhs); }
	};
	template <class T>
	using max_segment_tree = segment_tree <T, max_s<T>>;

	template <class T>
	struct min_s
	{
		T operator()(T lhs, T rhs) const { return std::min<T>(lhs, rhs); }
	};
	template <class T>
	using min_segment_tree = segment_tree<T, min_s<T>>;
}

namespace range_ns
{
	template<class Container>
	void print(const Container& container, const char* sep = "\n")
	{
		std::copy(container.begin(), container.end(), ostream_iterator<typename Container::value_type>(cout, sep));
	}

	template<class Container, class Compare = std::less<typename Container::value_type>>
	void sort(Container& container, Compare compare = Compare())
	{
		std::sort(container.begin(), container.end(), compare);
	}

	template<class Container, class T>
	decltype(auto) find(const Container& container, const T& elem)
	{
		return std::find(container.begin(), container.end(), elem);
	}

	template<class Container, class Condition>
	decltype(auto) find_if(const Container& container, Condition condition)
	{
		return std::find_if(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition = std::less<typename Container::value_type>>
	decltype(auto) max_element(Container& container, Condition condition = Condition())
	{
		return std::max_element(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition = std::less<typename Container::value_type>>
	decltype(auto) min_element(const Container& container, Condition condition = Condition())
	{
		return std::min_element(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition = std::less<typename Container::value_type>>
	decltype(auto) minmax_element(const Container& container, Condition condition = Condition())
	{
		return std::minmax_element(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition>
	decltype(auto) any_of(const Container& container, Condition condition)
	{
		return std::any_of(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition>
	decltype(auto) all_of(const Container& container, Condition condition)
	{
		return std::all_of(container.begin(), container.end(), condition);
	}

	template<class Container, class T>
	decltype(auto) count(const Container& container, const T& elem)
	{
		return std::count(container.begin(), container.end(), elem);
	}

	template<class Container, class Condition>
	decltype(auto) count_if(const Container& container, Condition condition)
	{
		return std::count_if(container.begin(), container.end(), condition);
	}

	template<class Container, class Func>
	decltype(auto) for_each(Container& container, Func func)
	{
		return std::for_each(container.begin(), container.end(), func);
	}

	template<class Container, class T>
	decltype(auto) equal_range(const Container& container, const T& elem)
	{
		return std::equal_range(container.begin(), container.end(), elem);
	}

	template<class Container, class T, class Compare = std::less<typename Container::value_type>>
	decltype(auto) lower_bound(const Container& container, const T& elem, Compare compare = Compare())
	{
		return std::lower_bound(container.begin(), container.end(), elem, compare);
	}

	template<class Container, class T>
	decltype(auto) upper_bound(const Container& container, const T& elem)
	{
		return std::upper_bound(container.begin(), container.end(), elem);
	}

	vector<ll> iota(ll number)
	{
		vector<ll> vec(number);
		std::iota(vec.begin(), vec.end(), 1);
		return vec;
	}

	template<class Container, class Condition>
	void erase_remove_if(Container& container, Condition condition)
	{
		container.erase(remove_if(container.begin(), container.end(), condition), container.end());
	}

	template<class Container, class Condition>
	Container copy_if(const Container& container, Condition condition)
	{
		Container container_result;
		copy_if(container.begin(), container.end(), back_inserter(container_result), condition);
		return container_result;
	}

	template <class Container>
	void reverse(Container& container)
	{
		std::reverse(begin(container), end(container));
	}

	struct sum_functor
	{
		ll operator()(ll sum, ll value) const { return sum + value; }
	};

	template<class Container, class Func = sum_functor>
	ll reduce(const Container& container, ll init_value = 0, Func func = sum_functor())
	{
		return std::accumulate(container.begin(), container.end(), init_value, func);
	}

	template<class Container, class Func = std::equal_to<typename Container::value_type>>
	decltype(auto) adjacent_find(const Container& container, Func func = Func())
	{
		return std::adjacent_find(container.begin(), container.end(), func);
	}

	template<class Container, class Predicate>
	vector<ll> copy_indexes(const Container& container, Predicate predicate)
	{
		vector<ll> indexes;
		for_in(lsize(container))
			if (predicate(container[i]))
				indexes.push_back(i);

		return indexes;
	}

	template<class InContainer, class OutContainer, class TransformFunction>
	void transform(const InContainer& in_container, OutContainer& out_container, TransformFunction transform_function)
	{
		if (out_container.capacity() == 0)
			out_container.reserve(size(in_container));
		std::transform(in_container.begin(), in_container.end(), back_inserter(out_container), transform_function);
	}
}

template <class T>
decltype(auto) read_vector(ll n)
{
	vector<T> res(n);
	for (auto& i : res)
		cin >> i;
	return res;
}

using Graph = vector<vector<ll>>;
using namespace segment_tree_ns;

void debth_first_search(const Graph& graph, ll start_vertex, ll end_vertex)
{
	stack<ll> vertex_stack;
	vertex_stack.push(start_vertex);
	vector<bool> visited(size(graph), false);
	visited[start_vertex] = true;

	vector<ll> path(size(graph), -1);
	while (!vertex_stack.empty())
	{
		ll vertex = vertex_stack.top();
		vertex_stack.pop();

		for (ll v : graph[vertex])
			if (!visited[v])
			{
				visited[v] = true;
				vertex_stack.push(v);
				path[v] = vertex;
			}
	}

	vector<ll> path_end_start = { end_vertex };
	ll vertex = -1;
	while (vertex != start_vertex)
	{
		vertex = path[path_end_start.back()];
		path_end_start.push_back(vertex);
	}

	range_ns::reverse(path_end_start);
	range_ns::for_each(path_end_start, [](ll& v) { ++v; });
	range_ns::print(path_end_start, " ");
}

using factorization_map = unordered_map<ll, ll>;

// factorize
factorization_map factorize(ll n)
{
	factorization_map ans;

	while (n % 2 == 0)
	{
		++ans[2];
		n = n / 2;
	}

	for (ll i = 3; i <= sqrt(n); i = i + 2)
	{
		while (n % i == 0)
		{
			++ans[i];
			n = n / i;
		}
	}

	// n is prime
	if (n > 2)
		++ans[n];

	return ans;
};

using namespace range_ns;

template <class Condition>
ll binary_search(ll l, ll r, Condition condition)
{
	while (l <= r)
	{
		ll m = (l + r) / 2;
		if (!condition(m))
			r = m - 1;
		else
			l = m + 1;
	}

	return min(l, r);
}

vector<int> z_function(string_view s) {
	int n = (int)s.length();
	vector<int> z(n);
	for (int i = 1, l = 0, r = 0; i < n; ++i) {
		if (i <= r)
			z[i] = min(r - i + 1, z[i - l]);
		while (i + z[i] < n && s[z[i]] == s[i + z[i]])
			++z[i];
		if (i + z[i] - 1 > r)
			l = i, r = i + z[i] - 1;
	}
	return z;
}

template <class T>
struct pt
{
	pt(T x_, T y_) : x(x_), y(y_) {}
	pt() {}
	T x, y;
};

template <class T>
bool operator== (const pt<T>& lhs, const pt<T>& rhs)
{
	return lhs.x == rhs.x && lhs.y == rhs.y;
}

template <class T>
struct rectangle
{
	rectangle() {}
	rectangle(const pt<T>& p1_, const pt<T>& p2_) : p1(p1_), p2(p2_) {}
	pt<T> p1, p2;
};

using doble_pt = pt<double>;
using ll_pt = pt<ll>;
using double_rectangle = rectangle<double>;
using ll_rectangle = rectangle<ll>;

ll ceil_div(ll n, ll k)
{
	return static_cast<ll>(ceil(static_cast<double>(n) / k));
}

int find_fisrt_occurance(const string& t, const string& p)
{
	auto vec = z_function(p + "#" + t);
	for (int i = 0; i < lsize(t); ++i)
		if (vec[i + lsize(p) + 1] == lsize(p))
			return i;

	return -1;
}

constexpr ll constexpr_pow(ll a, ll b)
{
	ll ans = 1;
	for_in(b)
		ans *= a;
	return ans;
}

ll MOD = 998244353;

ll BFS(const Graph& g, ll vertex, ll value, vector<bool>& visited)
{
	vector<ll> values(size(g));
	values[vertex] = value;

	visited[vertex] = true;

	queue<ll> q;
	q.push(vertex);
	ll ans = 1;
	while (!empty(q))
	{
		ll s = q.front();
		q.pop();
		for (ll v : g[s])
		{
			if (visited[v])
			{
				if ((values[v] + values[s]) % 2 == 0)
					return 0;
				continue;
			}
			visited[v] = true;
			if (values[s] == 2)
			{
				values[v] = 1;
				ans = (ans * 2) % MOD;
			}
			else
			{
				values[v] = 2;
			}
			q.push(v);
		}
	}

	return ans;
}

ll gcd(ll a, ll b, ll & x, ll & y)
{
	if (a == 0)
	{
		x = 0; y = 1;
		return b;
	}
	ll x1, y1;
	ll d = gcd(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}

ll inverse(ll a, ll m)
{
	ll x, y;
	ll g = gcd(a, m, x, y);
	x = (x % m + m) % m;
	return x;
}

int main(int argc, char** argv)
{
	ll n, m, k;
	cin >> n >> m >> k;

	if (k == 0 || n == 1)
	{
		cout << m;
		return 0;
	}

	auto pow_mod = [](ll a, ll b)
	{
		ll ans = 1;
		for_in(b)
			ans = (ans * a) % MOD;

		return ans;
	};

	auto bc = [](ll k, ll n) {
		ll ans = 1;
		for (ll i = n - k + 1; i <= n; ++i)
			ans = (ans * i) % MOD;
		for (ll i = 2; i <= k; ++i)
			ans = (ans * inverse(i, MOD)) % MOD;

		return ans;
	};

	ll ans = (bc(k, n - 1) * pow_mod(m - 1, k)) % MOD;
	ans = (ans * m) % MOD;
	cout << ans;
	return 0;
}

#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <utility>
#include <chrono>
#include <map>
#include <random>
#include <unordered_map>
#include <iterator>
#include <fstream>
#include <numeric>
#include <functional>
#include <exception>
#include <set>
#include <queue>
#include <string_view>
#include <stack>
#include <functional>
#include <type_traits>
#include <optional>
#include <iomanip>

#ifdef _WIN32
#include <intrin.h>
#endif // _WIN32

using ll = long long;

ll buildin_one_count(ll number)
{
#ifdef _WIN32
	return __popcnt64(number);
#else
	return __builtin_popcountl(number);
#endif // _WIN32
}

template <class Container>
ll lsize(const Container& container)
{
	return static_cast<ll>(size(container));
}

#define for_in(x) for (ll i = 0; i < x; ++i)
#define for_n(i, x) for (ll i = 0; i < x; ++i)

using namespace std;

namespace segment_tree_ns
{
	template <class T, class binary_func>
	class segment_tree
	{
	public:
		segment_tree(const std::vector<T>& elems)
			: tree_(4 * size(elems)), binary_op_(binary_func{}), tree_size_(size(elems))
		{
			static_assert(
				std::is_constructible_v<std::function<T(T, T)>, binary_func>,
				"wrong binary_func arg : it must be convertible to std::function<T(T, T)>");

			build(elems, 1, 0, tree_size_ - 1);
		}

		T get_value(size_t left, size_t right) const
		{
			auto opt_value = get_value_int(1, 0, tree_size_ - 1, left, right);
			if (opt_value.has_value())
				return opt_value.value();

			throw std::runtime_error("logical error : left > right");
		}

		void update(size_t pos, T new_value)
		{
			update_int(1, 0, tree_size_ - 1, pos, new_value);
		}
	private:
		void build(const std::vector<T>& cont, size_t vertex, size_t left, size_t right)
		{
			if (left == right)
			{
				tree_[vertex] = cont[left];
			}
			else
			{
				size_t center = (left + right) / 2;
				build(cont, vertex * 2, left, center);
				build(cont, vertex * 2 + 1, center + 1, right);
				tree_[vertex] = binary_op_(tree_[vertex * 2], tree_[vertex * 2 + 1]);
			}
		}

		std::optional<T> get_value_int(size_t vertex, size_t tree_left, size_t tree_right, size_t left, size_t right) const
		{
			if (left > right)
				return std::nullopt;
			if (left == tree_left && right == tree_right)
				return tree_[vertex];
			size_t center = (tree_left + tree_right) / 2;

			auto first = get_value_int(vertex * 2, tree_left, center, left, std::min(right, center));
			auto second = get_value_int(vertex * 2 + 1, center + 1, tree_right, std::max(left, center + 1), right);
			if (first.has_value() && second.has_value())
				return binary_op_(first.value(), second.value());
			else if (first.has_value())
				return first.value();
			else
				return second.value();
		}

		void update_int(size_t vertex, size_t tree_left, size_t tree_right, size_t pos, T new_value)
		{
			if (tree_left == tree_right)
			{
				tree_[vertex] = new_value;
			}
			else
			{
				size_t center = (tree_left + tree_right) / 2;
				if (pos <= center)
					update_int(vertex * 2, tree_left, center, pos, new_value);
				else
					update_int(vertex * 2 + 1, center + 1, tree_right, pos, new_value);
				tree_[vertex] = binary_op_(tree_[vertex * 2], tree_[vertex * 2 + 1]);
			}
		}
	private:
		std::vector<T> tree_;
		const size_t tree_size_;
		std::function<T(T, T)> binary_op_;
	};

	template <class T>
	using sum_segment_tree = segment_tree<T, std::plus<T>>;

	template <class T>
	struct max_s
	{
		T operator()(T lhs, T rhs) const { return std::max<T>(lhs, rhs); }
	};
	template <class T>
	using max_segment_tree = segment_tree <T, max_s<T>>;

	template <class T>
	struct min_s
	{
		T operator()(T lhs, T rhs) const { return std::min<T>(lhs, rhs); }
	};
	template <class T>
	using min_segment_tree = segment_tree<T, min_s<T>>;
}

namespace range_ns
{
	template<class Container>
	void print(const Container& container, const char* sep = "\n")
	{
		std::copy(container.begin(), container.end(), ostream_iterator<typename Container::value_type>(cout, sep));
	}

	template<class Container, class Compare = std::less<typename Container::value_type>>
	void sort(Container& container, Compare compare = Compare())
	{
		std::sort(container.begin(), container.end(), compare);
	}

	template<class Container, class T>
	decltype(auto) find(const Container& container, const T& elem)
	{
		return std::find(container.begin(), container.end(), elem);
	}

	template<class Container, class Condition>
	decltype(auto) find_if(const Container& container, Condition condition)
	{
		return std::find_if(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition = std::less<typename Container::value_type>>
	decltype(auto) max_element(Container& container, Condition condition = Condition())
	{
		return std::max_element(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition = std::less<typename Container::value_type>>
	decltype(auto) min_element(const Container& container, Condition condition = Condition())
	{
		return std::min_element(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition = std::less<typename Container::value_type>>
	decltype(auto) minmax_element(const Container& container, Condition condition = Condition())
	{
		return std::minmax_element(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition>
	decltype(auto) any_of(const Container& container, Condition condition)
	{
		return std::any_of(container.begin(), container.end(), condition);
	}

	template<class Container, class Condition>
	decltype(auto) all_of(const Container& container, Condition condition)
	{
		return std::all_of(container.begin(), container.end(), condition);
	}

	template<class Container, class T>
	decltype(auto) count(const Container& container, const T& elem)
	{
		return std::count(container.begin(), container.end(), elem);
	}

	template<class Container, class Condition>
	decltype(auto) count_if(const Container& container, Condition condition)
	{
		return std::count_if(container.begin(), container.end(), condition);
	}

	template<class Container, class Func>
	decltype(auto) for_each(Container& container, Func func)
	{
		return std::for_each(container.begin(), container.end(), func);
	}

	template<class Container, class T>
	decltype(auto) equal_range(const Container& container, const T& elem)
	{
		return std::equal_range(container.begin(), container.end(), elem);
	}

	template<class Container, class T, class Compare = std::less<typename Container::value_type>>
	decltype(auto) lower_bound(const Container& container, const T& elem, Compare compare = Compare())
	{
		return std::lower_bound(container.begin(), container.end(), elem, compare);
	}

	template<class Container, class T>
	decltype(auto) upper_bound(const Container& container, const T& elem)
	{
		return std::upper_bound(container.begin(), container.end(), elem);
	}

	vector<ll> iota(ll number)
	{
		vector<ll> vec(number);
		std::iota(vec.begin(), vec.end(), 1);
		return vec;
	}

	template<class Container, class Condition>
	void erase_remove_if(Container& container, Condition condition)
	{
		container.erase(remove_if(container.begin(), container.end(), condition), container.end());
	}

	template<class Container, class Condition>
	Container copy_if(const Container& container, Condition condition)
	{
		Container container_result;
		copy_if(container.begin(), container.end(), back_inserter(container_result), condition);
		return container_result;
	}

	template <class Container>
	void reverse(Container& container)
	{
		std::reverse(begin(container), end(container));
	}

	struct sum_functor
	{
		ll operator()(ll sum, ll value) const { return sum + value; }
	};

	template<class Container, class Func = sum_functor>
	ll reduce(const Container& container, ll init_value = 0, Func func = sum_functor())
	{
		return std::accumulate(container.begin(), container.end(), init_value, func);
	}

	template<class Container, class Func = std::equal_to<typename Container::value_type>>
	decltype(auto) adjacent_find(const Container& container, Func func = Func())
	{
		return std::adjacent_find(container.begin(), container.end(), func);
	}

	template<class Container, class Predicate>
	vector<ll> copy_indexes(const Container& container, Predicate predicate)
	{
		vector<ll> indexes;
		for_in(lsize(container))
			if (predicate(container[i]))
				indexes.push_back(i);

		return indexes;
	}

	template<class InContainer, class OutContainer, class TransformFunction>
	void transform(const InContainer& in_container, OutContainer& out_container, TransformFunction transform_function)
	{
		if (out_container.capacity() == 0)
			out_container.reserve(size(in_container));
		std::transform(in_container.begin(), in_container.end(), back_inserter(out_container), transform_function);
	}
}

template <class T>
decltype(auto) read_vector(ll n)
{
	vector<T> res(n);
	for (auto& i : res)
		cin >> i;
	return res;
}

using Graph = vector<vector<ll>>;
using namespace segment_tree_ns;

void debth_first_search(const Graph& graph, ll start_vertex, ll end_vertex)
{
	stack<ll> vertex_stack;
	vertex_stack.push(start_vertex);
	vector<bool> visited(size(graph), false);
	visited[start_vertex] = true;

	vector<ll> path(size(graph), -1);
	while (!vertex_stack.empty())
	{
		ll vertex = vertex_stack.top();
		vertex_stack.pop();

		for (ll v : graph[vertex])
			if (!visited[v])
			{
				visited[v] = true;
				vertex_stack.push(v);
				path[v] = vertex;
			}
	}

	vector<ll> path_end_start = { end_vertex };
	ll vertex = -1;
	while (vertex != start_vertex)
	{
		vertex = path[path_end_start.back()];
		path_end_start.push_back(vertex);
	}

	range_ns::reverse(path_end_start);
	range_ns::for_each(path_end_start, [](ll& v) { ++v; });
	range_ns::print(path_end_start, " ");
}

using factorization_map = unordered_map<ll, ll>;

// factorize
factorization_map factorize(ll n)
{
	factorization_map ans;

	while (n % 2 == 0)
	{
		++ans[2];
		n = n / 2;
	}

	for (ll i = 3; i <= sqrt(n); i = i + 2)
	{
		while (n % i == 0)
		{
			++ans[i];
			n = n / i;
		}
	}

	// n is prime
	if (n > 2)
		++ans[n];

	return ans;
};

using namespace range_ns;

template <class Condition>
ll binary_search(ll l, ll r, Condition condition)
{
	while (l <= r)
	{
		ll m = (l + r) / 2;
		if (!condition(m))
			r = m - 1;
		else
			l = m + 1;
	}

	return min(l, r);
}

vector<int> z_function(string_view s) {
	int n = (int)s.length();
	vector<int> z(n);
	for (int i = 1, l = 0, r = 0; i < n; ++i) {
		if (i <= r)
			z[i] = min(r - i + 1, z[i - l]);
		while (i + z[i] < n && s[z[i]] == s[i + z[i]])
			++z[i];
		if (i + z[i] - 1 > r)
			l = i, r = i + z[i] - 1;
	}
	return z;
}

template <class T>
struct pt
{
	pt(T x_, T y_) : x(x_), y(y_) {}
	pt() {}
	T x, y;
};

template <class T>
bool operator== (const pt<T>& lhs, const pt<T>& rhs)
{
	return lhs.x == rhs.x && lhs.y == rhs.y;
}

template <class T>
struct rectangle
{
	rectangle() {}
	rectangle(const pt<T>& p1_, const pt<T>& p2_) : p1(p1_), p2(p2_) {}
	pt<T> p1, p2;
};

using doble_pt = pt<double>;
using ll_pt = pt<ll>;
using double_rectangle = rectangle<double>;
using ll_rectangle = rectangle<ll>;

ll ceil_div(ll n, ll k)
{
	return static_cast<ll>(ceil(static_cast<double>(n) / k));
}

int find_fisrt_occurance(const string& t, const string& p)
{
	auto vec = z_function(p + "#" + t);
	for (int i = 0; i < lsize(t); ++i)
		if (vec[i + lsize(p) + 1] == lsize(p))
			return i;

	return -1;
}

constexpr ll constexpr_pow(ll a, ll b)
{
	ll ans = 1;
	for_in(b)
		ans *= a;
	return ans;
}

ll MOD = 998244353;

ll BFS(const Graph& g, ll vertex, ll value, vector<bool>& visited)
{
	vector<ll> values(size(g));
	values[vertex] = value;

	visited[vertex] = true;

	queue<ll> q;
	q.push(vertex);
	ll ans = 1;
	while (!empty(q))
	{
		ll s = q.front();
		q.pop();
		for (ll v : g[s])
		{
			if (visited[v])
			{
				if ((values[v] + values[s]) % 2 == 0)
					return 0;
				continue;
			}
			visited[v] = true;
			if (values[s] == 2)
			{
				values[v] = 1;
				ans = (ans * 2) % MOD;
			}
			else
			{
				values[v] = 2;
			}
			q.push(v);
		}
	}

	return ans;
}

ll bin_pow_mod(ll a, ll n)
{
	ll res = 1;

	while (n)
	{
		if (n & 1)
		{
			res = (res * a) % MOD;
			--n;
		}
		else
		{
			a = (a * a) % MOD;
			n /= 2;
		}
	}

	return res;
}

ll inverse_mod(ll a, ll m)
{
	return bin_pow_mod(a, m - 2);
}

int main(int argc, char** argv)
{
	ll n, m, k;
	cin >> n >> m >> k;

	if (k == 0 || n == 1)
	{
		cout << m;
		return 0;
	}

	auto pow_mod = [](ll a, ll b)
	{
		ll ans = 1;
		for_in(b)
			ans = (ans * a) % MOD;

		return ans;
	};

	auto bc = [](ll k, ll n) {
		ll ans = 1;
		for (ll i = n - k + 1; i <= n; ++i)
			ans = (ans * i) % MOD;

		ll divisor = 1;
		for (ll i = 2; i <= k; ++i)
			divisor = (divisor * i) % MOD;

		return (ans * inverse_mod(divisor, MOD)) % MOD;
	};

	ll ans = (pow_mod(m - 1, k) * m) % MOD;
	ans = (ans * bc(k, n - 1)) % MOD;
	cout << ans;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main (){

	int x = 998244353;

	int n,m,k;
	cin >> n >> m >> k;

	vector <vector <long long>> dp (k+1, vector <long long> (n,0));

	for (int i=0; i<n; i++) dp[0][i]=m;
	for (int i=1; i<=k; i++) dp[i][0]=0;

	for (int i=1; i<=k; i++){

		for (int j=1; j<n; j++){

			dp[i][j]=(dp[i][j-1] + (dp[i-1][j-1]*(m-1)))%x;

			//cout << dp[i][k] << " ";
		}

		//cout << endl;
	}

	cout << dp[k][n-1] << endl;

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define len(a) (int)(a.size())
#define Pi acos(-1.)
#define x first
#define y second

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef unsigned long long ull;
typedef long double ld;
const ll MOD=998244353;
const ll INF=1e18;
const int MAXN = 2e5+10;
const int MAXM = 1e4+500;
const int N = 2000 + 5;
const double EPS = 1e-9;
const int maxtime = 3600;
int dx[] = {-1,1,0,0};
int dy[] = {0,0,1,-1};
ll i,j;
ll n,k,m,t;

ll a[MAXN];
ll C[N][N];

ll binpow(ll val, ll deg) {
        if (!deg) return 1;
        if (deg & 1) return binpow(val, deg - 1) * val % MOD;
        ll res = binpow(val ,deg / 2);
        return (res*res) % MOD;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    for(int n=1;n<N;n++)
    {
        C[n][0]=C[n][n]=1;
        for(int k=1;k<n;k++)
        {
             C[n][k] = (C[n-1][k-1] + C[n-1][k])%MOD;
        }
    }

    cin>>n>>m>>k;

    if(k == 0)
    {
        cout<<m<<endl;
        return 0;
    }

    ll res = (C[n-1][k] * m)%MOD;
    ll tmp = binpow(m-1,k);
    res = (res*tmp)%MOD;
    cout<<res<<endl;

    return 0;

}

# include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define endl "\n"
#define ll long long
#define md 998244353

using namespace std;

ll modexp(ll x, ll y)
{
	ll res = 1;
	x %= md;
	if(x == 0)
		return 0;
	while(y > 0)
	{
		if(y & 1)
			res = (res * x) % md;
		y = y >> 1;
		x = (x * x) % md;
	}
	return res;
}

ll inv(ll a, ll p)
{
	return modexp(a, p - 2);
}

ll getnck(ll n, ll k)
{
	k = min(k, n - k);
	ll ans = 1;
	for(int i = 1; i <= k; i++)
		ans = ((ans * (n - i + 1)) % md) * inv(i, md) % md;
	return ans;
}

int main()
{
	IOS;
	int n, m, k;
	cin >> n >> m >> k;
	ll ans = (((m * getnck(n - 1, k)) % md) * modexp(m - 1, k)) % md;
	cout << ans;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()

typedef long long ll;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef long double ld;

template <typename T1, typename T2> inline void chkmin(T1 &x, T2 y) { if (y < x) x = y; };
template <typename T1, typename T2> inline void chkmax(T1 &x, T2 y) { if (y > x) x = y; };

const int MOD = 998244353;
int add(int x, int y) {
    x += y;
    if (x >= MOD) x -= MOD;
    if (x < 0) x += MOD;
    return x;
}
int mult(int x, int y) {
    return (x * (ll)y) % MOD;
}

const int N = 2003;
int dp[N][N];

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
#ifdef DEBUG
    freopen("in", "r", stdin);
#endif

    int n, m, k;
    cin >> n >> m >> k;

    dp[1][0] = 1;
    for (int i = 2; i <= n; ++i) {
        dp[i][0] = dp[i - 1][0];
        for (int j = 1; j <= k; ++j) {
            dp[i][j] = add(mult(m - 1, dp[i - 1][k - 1]), dp[i - 1][k]);
        }
    }
    cout << mult(m, dp[n][k]) << '\n';

    return 0;
}

// done by me; you are mal if you see this code and if you aren't me
#include<bits/stdc++.h>
#define NFS ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
using namespace std;
typedef long long ll;
const int N = 2e3 + 5;
const int mod = 998244353;
long long a[N][N];

void gaf(int v)
{
    v --;
    return;
}

int main()
{
    NFS;
    int n , m , k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
    {
		a[i][0] = m;
	}
	for(int i = 2; i <= n; i++)
	{
		for(int j = 1; j <= min(k , i - 1); j ++)
		{
			a[i][j] = (a[i][j] + a[i - 1][j]) % mod;
			a[i][j] = (a[i][j] + (a[i - 1][j - 1] * (m - 1)) % mod) % mod;
		}
	}
	cout << 3;
	return 0;
}

#include <bits/stdc++.h>
#define MaxN 998244353
using namespace std;

long long c[2003][2003]; //c[up][down]

long long power(int p,int k){ // compute p ^ k
	long long ans = 1;
	int b = p;
	while(k != 0){
		if(k & 1){ // odd
			ans *= b;
			ans %= MaxN;
		}
		b *= b;
		b %= MaxN;
		k >>= 1;
	}
	return ans % MaxN;
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);

	int n,m,k;
	cin >> n >> m >> k;
	for(int i = 1;i < 2003;++i){
		c[i][0] = 1;
		c[i][1] = i;
	}
	for(int i = 1;i < 2003;++i){
		for(int j = 1;j <= i;++j){
			c[j][i] = (c[j - 1][i] + c[j - 1][i - 1]) % MaxN;
		}
	}
	//cout << c[n - 1][k] << " * " << m << " * " << power(m,k - 1) << "\n";
	if(!k) cout << m << "\n";
	else cout << (c[n - 1][k] * m * power(m,k - 1)) % MaxN << "\n";

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define loop(i,a,b) for(int i=a;i<b;i++)
#define pb push_back
#define mp make_pair
#define ft first
#define sd second
int num[2005][2005],val;
int mod = 998244353;
int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	//memset(num,1,sizeof(num));
	loop(i,0,max(m,n)+1)
		num[i][0] = 1;
	loop(i,1,max(m,n)+1)
	{
		loop(j,1,k+1)
		{
			num[i][j] = (num[i-1][j-1]+num[i-1][j])%mod;
		}
	}
	int a = 1;
	int r = m-1;
	for(int num1=k;num1>0;num1=num1/2)
	{
		if(num1&1)
			a = (a*r)%mod;
		r = (r*r)%mod;
	}
	val = (num[n-1][k]*m*a)%mod;
	cout << val << "\n";
	return 0;

}

#include <bits/stdc++.h>
using namespace std;
const char NL = '\n';
#define PI 3.14159265
#define test int t;cin >> t;while (t--)
#define all(a) a.begin(), a.end()
#define int long long
int mod = 1000000007;
void read(vector<int> &a);

int ncr(int n, int r)
{
    if(n-r < r)
        r = n-r;

    vector<int> c(r+1,0);
    c[0] = 1;
    for(int i = 1; i <= n; i++)
    {
        for(int j = min(i,r); j > 0; j--)
        {
            c[j] = (c[j]+c[j-1])%mod;
        }
    }
    return c[r];
}

inline void solve()
{
    // all the code goes here
    mod = 998244353;
    int n,m,k;cin>>n>>m>>k;
    int ans = ncr(n-1,k);
    cout<<"ans "<<ans<<NL;
    int ite = k;
    while(ite > 0)
    {
        ans*=(m-1);
        ans%=mod;
        ite--;
    }
    ans = (ans*m)%mod;
    cout<<ans<<NL;
}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    solve();
    fflush(stdin);
    fflush(stdout);
    return 0;
}

void read(vector<int> &a)
{
    for(auto &it : a)cin>>it;
}

// In the name of God

#include <bits/stdc++.h>

using namespace std;

#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL);
#define debug(x) cout << #x ": " << x << endl;

#define MOD 998244353

long long fact(long long x) {
	long long ans = 1;
	for(long long i=2; i<=x; i++) {
		ans *= i % MOD;
		ans = ans % MOD;
	}
	return ans%MOD;
}

#define N 1000000
// Thanks to great guy who wrote this library :D

long long f[N + 1];

/* O(Log(Y)). */
long long fast_exp(long long x, long long y){
	long long ans = 1; // Base case.

	// Decomposing y in binary. Multiplying the answer by x^1, x^2, x^4, x^8, ...
	while (y > 0){
		// If current bit is set.
		if (y & 1ll){
			ans = (ans * x) % MOD;
		}

		y >>= 1ll; // Next bit.
		x = (x * x) % MOD; // Next power of x.
	}

	return ans;
}

/* O(Log(MOD)). */
long long nck(long long n, long long k){
	long long num, den;

	if (k < 0 or k > n){
		return 0;
	}

	num = f[n];
	den = (f[k] * f[n - k]) % MOD;

	return (num * fast_exp(den, MOD - 2)) % MOD;
}

/* O(N). */
void nck_init(){
	long long i;

	f[0] = 1;

	for (i = 1; i <= N; i++){
		f[i] = (f[i - 1] * i) % MOD;
	}
}

int main() {
	IOS
	long long n, m, k;
	cin >> n >> m >> k;
	nck_init();
	long long ans = 1;
	for(long long i=m; i>=m-k; i--) {
		ans *= i;
		ans = ans % MOD;
	}
	ans *= nck(n-1, k);
	ans = ans % MOD;
	cout << ans;
	return 0;
}

#include <iostream>
using namespace std;

const int MAXN=2e3+5;
const int mod=998244353;

int n,m,k,dp[MAXN][MAXN];

int main()
{
    cin>>n>>m>>k;
    for(int i=0;i<=n;i++) dp[i][0]=m;
    for(int i=2;i<=n;i++)
    {
    	for(int j=1;j<=k;j++)
    	{
    		dp[i][j]=(dp[i-1][j-1]*(m-1))%mod;
    		dp[i][j]=(dp[i][j]+dp[i-1][j])%mod;
		}
	}
	cout<<dp[n][k];
}

#include <bits/stdc++.h>
#define forn(i,n) for(int i=0; i<n; i++)
#define pb push_back
#define MOD 998244353
using namespace std;

int main(){
	int n,m,k;
	cin>>n>>m>>k;
	vector<long long int> arr(n+1,0);
	vector<long long int> store(n+1,0);
	arr[0]=1;
	forn(i,k){
		store=vector<long long int> (n+1,0);
		for (int j=1; j<=n; j++){
			for (int k=0; k<=n; k++){
				if (j+k>n) break;
				store[j+k]+=arr[k];
				store[j+k]%=MOD;
			}
		}
		forn(i,n) arr[i]=store[i];

	}
	//forn(i,n) cout<<arr[i]<<" ";
	long long int ans=0;
	forn(i,n) {ans+=arr[i];}
	ans*=m;
	ans%=MOD;
	forn(i,k) ans*=(m-1);ans%=MOD;
	cout<<ans;
}

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <stdlib.h>

using namespace std;
// vector push_back push front top empty pop make_pair long long insert begin end
typedef long long ll;
typedef vector<int> vi;
typedef vector<pair <int,int> > vpi;
typedef pair<int,int> pi;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define B begin()
#define rB rbegin()
#define E end()
#define rE rend()
#define Z size()
#define REP(i,a,b) for (int i = a; i < b; i++)
#define L length()
#define show(a) cerr << " *** " << a << endl;
#define show1(a) cerr << " /// " << a << endl;

const int mod = 998244353;

ll bin_pow(ll a, ll b)
{
	if (a == 0)
		return 0;
	if (b == 0)
		return 1;
	ll res = bin_pow(a, b /2) % mod;
	ll out;
	if (a % 2)
		out = (((res * res) % mod) * a) % mod;
	else
		out = ((res * res) % mod);
	return out;
}

ll fact_m(ll a)
{
	ll out = a;
	a--;
	out %= mod;
	while (a > 1)
	{
		out *= a;
		out %= mod;
		a--;
	}
	return (out % mod);
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll a, b, c;
	cin >> a >> b >> c;
	ll ans = fact_m(a - 1);
	if (c == 0)
		ans = 1;
	else
		ans *= bin_pow(c, mod - 2);
	ans *= b;
	ans %= mod;
	ans *= bin_pow(b - 1, c);
	cout << ans;
}

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const int M = 998244353;

ll n, m, k, t;
ll dp[2005][2005];

void f(ll ii,ll jj){
    for (ll i = ii; i < n ; ++i) {
        for (ll j = jj; j <= k ; ++j) {
            dp[i + 1][j] += dp[i][j];
            dp[i + 1][j] %= M;
            dp[i + 1][j + 1] += dp[i][j]*(m - 1);
            dp[i + 1][j + 1] %= M;
        }
    }
}

int main() {
    cin >> t >> n >> m;
    dp[1][0] = m;
    cin >> k;
    ll kGhabli = k;
    f(1,0);
    cout << dp[n][k] << endl;
    for (int i = 1; i < t ; ++i) {
        kGhabli = k;
        cin >> k;
        if (dp[n][k] == 0)
            f(1,kGhabli);
        cout << dp[n][k] << endl;
    }
    return 0;
}

#include <bits/stdc++.h>
#define forn(i,n) for(int i=0; i<n; i++)
#define pb push_back
#define MOD 998244353
using namespace std;

long long int power(long long int a,long long int b){
	long long int sq=a*a;
	sq%=MOD;
	if (b==0) {return 1;}
	else if (b%2==0) {long long int hold=power(sq,b/2); hold%=MOD; return hold;}
	else {long long int hold=(a*power(sq,b/2)); hold%=MOD; return hold;}
}

int main(){
	int n,m,k;
	cin>>n>>m>>k;
	vector< vector<long long int> >arr(n+1,vector<long long int>(k+1,0));
	arr[1][0]=m;
	for(int i=1;i<n;i++){
		for(int j=1;j<k;j++){
			arr[i+1][j]+=arr[i][j];
			arr[i+1][j]%=MOD;
			arr[i+1][j+1]+=arr[i][j]*(m-1);
			arr[i+1][j+1]%=MOD;
		}
		arr[i+1][k]+=arr[i][k];
		arr[i+1][k]%=MOD;
	}
	cout<<arr[n][k];
}

#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll, ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define ppi pair<pii,int>
#define pip pair<int,pii>
#define pdd pair<double, double>
#define f first
#define s second
#define MOD 998244353
#define mkp make_pair
#define FOR(i,l,r) for (int i=l;i<=r;i++)
#define LOR(i,l,r) for (ll i=l;i<=r;i++)
#define FORD(i,r,l) for (int i=r;i>=l;i--)
#define LORD(i,r,l) for (ll i=r;i>=l;i--)
#define CL(x) memset(x,0,sizeof(x))
#define DBG(x) cout << #x << " : " << x << '\n'
#define ALL(x) x.begin(), x.end()
#define SZ(x) x.size()
#define UI(x) (int)(x-'A')
#define LI(x) (int)(x-'a')
#define LL_MAX (1LL<<60)
#define DB 0
typedef long long ll;
typedef long double ld;

ll N, M, K;
ll DP[2005][2005];

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin>>N>>M>>K;
    if( K==0 )
    {
        cout<<M<<'\n';
        return 0;
    }
    DP[1][0] = M;
    FOR(i,2,N)
    {
        FOR(j,1,K)
        {
            DP[i][j] = (DP[i-1][j-1]*M%MOD+DP[i-1][j])%MOD;
        }
    }
    cout<<DP[N][K]<<'\n';

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define BUFF ios_base::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define MOD 998244353

ll powmod(ll base, ll exp, ll modulus) {
	base %= modulus;
	ll result = 1;
	while (exp > 0) {
		if (exp & 1) result = (result * base) % modulus;
		base = (base * base) % modulus;
		exp >>= 1;
	}
  	return result;
}

int main(){
	BUFF
	int n, m, k;

	cin >> n >> m >> k;

	ll pascal[2001][201];
	memset(pascal, 0, sizeof(pascal));
	pascal[0][0] = 1;
	pascal[0][1] = 0;
	for(int i = 1; i<=n; i++){
		pascal[i][0] = 1;
		for(int j = 1; j<=i; j++){
			pascal[i][j] = (pascal[i-1][j] + pascal[i-1][j-1])%MOD;
		}
	}
	ll ans;
	if(k>0) ans = (m * powmod(m-1, k, MOD))%MOD;
	else ans = m;

	ans = (ans * pascal[n-1][k])%MOD;

	cout << ans << '\n';

	return 0;
}

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;

#define TRACE

#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif

#define rep(i, n)    for(int i = 0; i < (n); ++i)
#define repA(i, a, n)  for(int i = a; i <= (n); ++i)
#define repD(i, a, n)  for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define fill(a)  memset(a, 0, sizeof (a))
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

void pre(){

}

void solve(){

}
vector<int> s[400009];
struct UF {
		vi e;
		UF(int n) : e(n, -1) {}
		bool same_set(int a, int b) { return find(a) == find(b); }
		int size(int x) { return -e[find(x)]; }
		int find(int x) { return e[x] < 0 ? x : e[x] = find(e[x]); }
		void join(int a, int b) {
			a = find(a), b = find(b);
			if (a == b) return;
			if (e[a] > e[b]) swap(a, b);
			e[a] += e[b]; e[b] = a;
		}
};
/*pre();
	int n,m,q;cin>>n>>m>>q;
	rep(i,q){
		int r,c;cin>>r>>c;
		s[r].pb(n+c);
		s[n+c].pb(r);
	}
	UF dsu(n+m+1);
	repA(i,1,n+m){
		trav(j,s[i]) dsu.join(s[i][0],j);
	}
	int ans=0;
	repA(i,1,n+m) if(dsu.find(i)==i) ans++;
	repA(i,1,n) if(dsu.find(i)==i&&sz(s[i])!=0) ans--;
	ans--;
	cout<<ans;*/
ll dp[2002][2002];
ll p=998244353;
void fun(void){
	for(int i=1;i<2001;i++){
		for(int j=0;j<=i;j++){
			if(j==1)dp[i][j]=i;
			else if(j==0 || j==i)dp[i][j]=1;
			else{
				dp[i][j]=(dp[i-1][j-1]+dp[i-1][j])%p;
			}
		}
	}
}
ll _pow(ll a,ll b){
	ll c=1,d,e,f;
	if(b==0)return 1;
	else{
		while(b>0){
			if(b%2!=0)c=(c*a)%p;
			a=(a*a)%p;
			b/=2;
		}
	}
	return c;
}
int main() {
	cin.sync_with_stdio(0); cin.tie(0);
	cin.exceptions(cin.failbit);
	ll n,m,k;
	ll a=0,b,c,d,e,f;
	cin>>n>>m>>k;
	ll ans=0;
	fun();
	for(int i=1;i<=k+1;i++){
		b=(i*_pow(i-1,k))%p;
		c=(b*dp[m][i])%p;
		a=(a+c)%p;
	}
	d=min(m,k+1);
	b=dp[m][d];
	c=_pow(d-1,k);
	a=(b*c)%p;
	//cout<<b<<" "<<c<<" "<<a<<endl;
	a=(a*(d))%p;
	a=(a*dp[n-1][k])%p;
	cout<<a;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define BUFF ios_base::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define MOD 998244353

ll powmod(ll base, ll exp, ll modulus) {
	base %= modulus;
	ll result = 1;
	while (exp > 0) {
		if (exp & 1) result = (result * base) % modulus;
		base = (base * base) % modulus;
		exp >>= 1;
	}
  	return result;
}

int main(){
	BUFF
	int n, m, k;

	cin >> n >> m >> k;

	ll pascal[2001][201];
	memset(pascal, 0, sizeof(pascal));
	pascal[0][0] = 1;
	pascal[0][1] = 0;
	for(int i = 1; i<=n; i++){
		pascal[i][0] = 1;
		for(int j = 1; j<=i; j++){
			pascal[i][j] = (pascal[i-1][j] + pascal[i-1][j-1])%MOD;
		}
	}
	ll ans;
	if(k>0) ans = (m * powmod(k, m-1, MOD))%MOD;
	else ans = m;

	ans = ans * pascal[n-1][k];

	cout << ans << '\n';

	return 0;
}

#include <bits/stdc++.h>
using namespace std;

long long mod = 998244353;

long long inv(long long x){
  long long res = 1;
  long long k = mod - 2;
  long long y = x;
  while(k){
    if(k&1)res = (res*y)%mod;
    y = (y*y) % mod;
    k /= 2;
  }
  return res;
}

long long c(int n,int k){
   long long ret = 1;

  for(int i = n-k+1;i <= n;i++){
    ret*=i;
    if(ret > mod)ret = ret%mod;
  }
  long long d = 1;
  for(int i = 2;i <= k;i++){
    d *= i;
  }
  ret = (ret*inv(d))%mod;

  return ret;
}

int main(){
  int n, m, k;

  cin >> n >> m >> k;

  long long ret = c(n+k-2,k);

  for(int i = 0;i < k+1 ;i++){
    ret = (ret*(m-i))%mod;
  }

  cout << ret << endl;
}

//Problem:
//Date:
//Skill:
//Bug:
/////////////////////////////////////////definations////////////////////
#define CLR(a) memset((a),0,sizeof(a))
#define RE(i,n)  for(int i=0;i<n;i++)
#define RE2(i,n) for(int i=1;i<=n;i++)
#define IN(n) scanf("%d",&n)
#define LLIN(n) scanf("%lld",&n)
#define INC(c) do{scanf("%c",&c);}while(isspace(c))
#define PI(a) printf("%d",a)
#define LLPI(a) printf("%lld",a)
#define PN	puts("");
using namespace std;
const long long llinf = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
///////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////options////////////////////////////////
const int maxn = int(2e3+10);
typedef long long ll;
#define stdcpph
#define CPP_IO
//#define LOCAL

#ifdef stdcpph
#include<bits/stdc++.h>
#else
#include<ctype.h>
#include<string.h>
#include<math.h>
#include<vector>
#include<map>
#include<algorithm>
#ifdef CPP_IO
#include<iostream>
#include<iomanip>
#include<string>
#else
#include<stdio.h>
#endif
#endif

///////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////Added Functions/////////////////////
const int MOD(998244353);
int n, m, k;
int dp[maxn][maxn];
ll fun(int num, int di)//前面1块易途，求后面涂num块，di个相同的的方法
{
	if (num == 1)
	{
		if (di == 0)return m - 1;
		else if (di == 1)return 1;
		else return 0;
	}

	{
		ll a(fun(num - 1, di - 1));//
		ll b((m - 1)*fun(num - 1, di));
		//return (a + b)% MOD;
		return fun(num - 1, di - 1);
	}
}
///////////////////////////////////////////////////////////////////////////
int main()
{
	int T(1), times(0);
#ifdef LOCAL //LOCAL
	freopen("C:\\Users\\VULCAN\\Desktop\\data.in", "r", stdin);
#endif

#ifdef CPP_IO// CPP_IO
	std::ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	//cin >> T;
#else
	//IN(T);
#endif

	//How to think:
	//先认真读题，把题目逻辑化，读清全部条件，再做，不然，哼哼
	//写题的时候遇到的一些”莫名“的错误大部分是自己的代码写错了一个变量
	//1.分治 2.容斥 3.化多元为单元
	//4.dp 分阶段，后阶段受前阶段的影响
	//5.凡是有很大的指数的，都可以先用log算一下
	//6.预处理，作用非常大，很快
	//
	//1.Do you use cout/cin? Do not use!
	//2.what's the maximum Int data? Is it beyond I32d?
	//3.Ever Mod after neccesary calculation?
	//4.Ever Cleaned the array before using?
	///////////////////////////////////////////code////////////////////////////////
	while (++times, T--,cin>>n>>m>>k)
	{
		k = n - 1 - k;
		if (n == 1)cout << m << endl;
		else if (m == 1)
		{
			if (k > 0)cout << 0 << endl;
			else cout << m << endl;
		}
		else
		{

			dp[1][0] = m - 1; dp[1][1] = 1;
			for (int i = 2; i <= n - 1; ++i)
			{
				for (int j = 0; j <= k; ++j)
				{
					if(j)
						dp[i][j] = (dp[i - 1][j - 1] + 1LL*dp[i - 1][j] * (m - 1)) % MOD;
					else
						dp[i][j] = (1LL * dp[i - 1][j] * (m - 1)) % MOD;
				}
			}
			cout << (1LL*dp[n - 1][k] * m%MOD) << endl;
		}

	}
	//////////////////////////////////////////////////////////////
	//dividing line
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int mod = 998244353;

int modexp(int x, int n)
{
    if(n==0)
    return 1;
    else if(n&1)
        return (modexp((x*x)%mod,n/2)%mod * x%mod )%mod;
    else
        return modexp((x*x)%mod,n/2)%mod;
}

int ans(int i, int n, int col, int k, int dp[][2010][2010])
{
    if(i==n)
    return 0;

    if(k==0)
    return 1;

    if(dp[col][i][k]!=-1)
    return dp[col][i][k]%mod;

    if(col==1)
    {
        return dp[1][i][k] = (ans(i+1,n,1,k,dp)%mod + ans(i+1,n,0,k-1,dp)%mod)%mod;
    }
    else
    {
        return dp[0][i][k] = (ans(i+1,n,0,k,dp)%mod + ans(i+1,n,1,k-1,dp)%mod)%mod;
    }
}

int main()
{
    int n,m,k;

    cin>>n>>m>>k;

    int dp[2][2010][2010];

    memset(dp,-1,sizeof(dp));

    int answer = ans(0,n,0,k,dp)%mod;

    //cout<<"ANSWER "<<answer<<endl;

    long final_answer = (answer%mod * (m%mod * modexp(m-1,k)%mod)%mod)%mod;

    cout<<final_answer<<endl;
}

#include <bits/stdc++.h>
using namespace std;
using llong = long long;

llong mod = 998244353;

long long C(int n,int k)
{
    if ((n==k) || (k==0)) {
        return 1;
    }
    if (k==1) {
        return n;
    }
    return (C(n-1,k)+C(n-1,k-1)) % mod;
}

llong n, m, k;

llong mult()
{
    llong res = 0;
    if (k == 0)
        return res;
    res = 1;
    for (auto i = 0; i < k; i++)
    {
        res *= (m - 1);
        res %= mod;
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    cout.tie(0);
    cin.tie(0);

    cin >> n >> m >> k;

    if (k == 0)
    {
        cout << m % mod;
        return 0;
    }

    cout << (((C(n - 1, k) * mult()) % mod) * m) % mod;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

template<typename T>
void out(T x) { cout << x << endl; exit(0); }

const int maxn = 2005;
const int mod = 998244353;

void add(int& res, int x) {
  res += x;
  if (res>mod) res-=mod;
}

void mult(int& res, int x) {
  int _res = res;
  for (int i=0; i<x-1; i++) add(res,_res);
}

int n,m,c;
int C[maxn][maxn];

int main() {
  ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
  //cout << fixed << setprecision(6);
  cin>>n>>m>>c;

  for (int i=0; i<maxn; i++) {
    C[i][0] = 1;
  }

  for (int i=1; i<maxn; i++) {
    for (int j=1; j<maxn; j++) {
      add(C[i][j], C[i-1][j]);
      add(C[i][j], C[i-1][j-1]);
    }
  }

  int ans = 1;
  if (c>0) ans = C[n-1][c];
  mult(ans,m);
  for (int i=1; i<c; i++) {
    mult(ans,m-1);
  }

  cout<<ans<<endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void){
	ll n,k,m;long mod=1000000007;
	cin>>n>>k>>m;
	vector<ll> v(n);
	for(long i=0;i<n;i++) cin>>v[i];
	vector<vector<ll>> C(n+5,vector<ll>(k/2+10));
	for(ll i=0;i<k/2+10;i++) C[0][i]=0;
	for(ll i=0;i<n+5;i++) C[i][0]=1;
	for(long N=1;N<n+5;N++){
		for(long R=1;R<k/2+10;R++)
			C[N][R]=(C[N-1][R]+C[N-1][R-1])%mod;
	}
	// cout<<C[5][4]<<" "<<C[4][2]<<endl;
	function<long(long,long)> sol=[&](long a,long b){
		ll ans=0;
		for(long i=1;i<=a;i++){
			ans=(ans+(C[a-i][(k-1)/2]*C[b+i-1][(k-1)/2])%mod)%mod;
		}
		return ans;
	};
	vector<long> gm(n);
	ll ans=0;
	gm[0]=(v[0]>=m)?1:0;
	for(long i=1;i<n;i++)
		gm[i]=gm[i-1]+((v[i]>=m)?1:0);
	for(long i=0;i<n;i++){
		for(long j=i;j<n;j++){
			long a=gm[j]-((i>0)?gm[i-1]:0);
			long b=j-i+1-a;
			long temp=sol(a,b);
			// cout<<"("<<i+1<<","<<j+1<<")="<<temp<<endl;
			ans=(ans+temp)%mod;
		}
	}
	cout<<ans<<endl;
}

#include<stdio.h>
#include<math.h>
/*long long fact(long long n)
  {
  if(n>0)
  return n*fact(n-1);
  else
  return 1;
  }*/
long long   pascal(long long n,long long m,long long mod  )
{
	long long  P[n+1],i,j;
	for(i=0;i<=n;i++)
	{
		for(j=i;j>=0;j--)

		{
			if(j==0 || j==i)
			{
				P[j]=1%mod;
				if(j==m && i==n)
					break;
			}

			else
			{
				P[j]=(P[j-1]+P[j])%mod;
				if(j==m && i==n)
					break;
			}

		}
		if(j==m && i==n)
			break;

	}
	return P[j];

}
int main()
{
//	int T;
//	scanf("%d",&T);

		long long  m,n,k,mod=998244353, ans;
		scanf("%lld %lld %lld",&n,&m,&k);
		if(n<m)
			ans=0;
		else
			ans=pascal(n-1,k,mod);
		ans=((ans%mod)*(m%mod))%mod;
		for(int i=1;i<=k;i++)
		{
			ans*=(m-1);
			ans%=m;
		}
		printf("%lld\n",ans);

}

#include <iostream>
using namespace std ;
const int M=998244353 ;
long long x , y , z , h , nCk;
int n , m , k ;
long long pw ( long long x , long long y ) {
	if ( y== 0 )
		return 1 ;
	if( y%2 ==0 )
		return pw(x , y/2 )*pw(x , y/2 )%M;
	else
		return pw(x , y/2 )*pw(x , y/2 )*x%M ;
}
int main(){
	y=1 , x=1 , z=1 , h=1 ;
	scanf("%d%d%d" , &n , &m , &k );
	for(int i=1 ; i< n ;i++ )
		x=x*i%M ;
	for(int i=1 ; i<= (n-1-k)  ; i++)
		y=y*i%M ;
	for(int i=1 ; i<=k ; i++ )
		h=h*i%M;
	for(int i=1 ; i<=k ; i++ )
		z=z*(m-1)%M;
	z=z*m ;
	z%=M ;
	y = y*h ;
	y%=M;
	nCk = x * pw(y,M-2) ;
	nCk%=M;
	// cout<<x<<" " << y<<" " << z<<endl;
	cout<< nCk*z <<endl;
	return 0 ;
}

#include <bits/stdc++.h>
#define N 100005
#define ll long long
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define sp " "
#define endl "\n"
#define fast cin.tie(0),cout.tie(0),ios_base::sync_with_stdio(false)
#define fi first
#define se second
#define ii pair<int,int>
#define lli pair<ll int,ll int>
#define MOD 998244353;
using namespace std;

ll int n,m,k;

long long fast_power(long long base, long long power)
{
    long long result = 1;
    while(power > 0) {

        if(power % 2 == 1) { // Can also use (power & 1) to make code even faster
            result = (result*base) % MOD;
        }
        base = (base * base) % MOD;
        power = power / 2; // Can also use power >>= 1; to make code even faster
    }
    return result;
}

int faktor(int x)//faktoriyel fonksiyonu
{
    int z,faktor=1;
     for(z=1;z<=x;z++)
    {
         faktor = (faktor * z)%MOD;
    }
    return faktor;
}

ll int kom(ll int x,ll int y)//kombinasyon fonk.   n!/r!(n-r)!
{
	if(y==0)
		return 1;
    ll int z,b,k;
    ll int kom;
    if(x>y) {b=x; k=y; } else  {b=y; k=x; }//büyük küçük sayı hangisi belirleniyor
    kom = faktor(b)/faktor(b)*faktor(b-k);
    kom=kom%MOD;
    return kom;
}
ll int fact(ll int n){
    if(n==0) return 1;
    if (n>0) return (n*fact(n-1))%MOD;
};

ll int NCR(ll int n,ll int r){
    if(n==r) return 1;
    if (r==0&&n!=0) return 1;
    else return (n*fact(n-1))/fact(n-1)*fact(n-r)%MOD;
};
int main()
{
	fast;
	cin>>n>>m>>k;
	// ll sum=m;
	ll tut=tut*NCR(n-1,k)%MOD;
	// cout<<tut<<endl;
	tut=(tut*m)%MOD;
	// cout<<tut<<endl;
	tut=tut*fast_power(m-1,k);
	cout<<tut;

}

#include <bits/stdc++.h>

#define int long long

const int MOD = 998244353, N = 2010;
int n, m, k, f[N];

int power(int base, int exp) {
  int ans = 1;
  while (exp) {
    if (exp&1)
      ans = (ans*base)%MOD;
    base = (base*base)%MOD;
    exp>>=1;
  }
  return ans%MOD;
}

int inv(int a) {
  a %= MOD;
  if (a < 0) a+= MOD;
  int b = MOD, u = 0, v = 1;
  while(a) {
    int t = b/a;
    b -= t*a; std::swap(a, b);
    u -= t*v; std::swap(u, v);
  }
  if (u < 0) u += MOD;
  return u%MOD;
}

int32_t main() {
  scanf("%lld%lld%lld", &n, &m, &k);

  f[0] = 1;
  for (int i = 1; i < N; i++)
    f[i] = (f[i-1]*i)%MOD;

  //printf("(%d/(%d*%d)) * ", f[n-1], f[k], f[n-(k+1)]);
  //printf("%d * (%d^%d) = ", m, m-1, k);
  //printf("%lld\n", ((f[n-1]/(f[k]*f[n-(k+1)]))*m*power(m-1, k))%MOD);
  printf("%lld\n", (f[n-1]*inv(f[k]*f[n-k-1])*m*power(m-1, k))%MOD);
  return 0;
}

#include <iostream>
#include <map>
using namespace std;
typedef long long int ll;
ll modulo=998244353;
ll dp[2010][2010];
ll rec(ll n, ll k)
{
    if(n==k)
        return 1;
    if(k==1)
        return n;
    if (dp[n][k]!=-1) return dp[n][k];
    dp[n][k]=(rec(n-1, k-1)+rec(n-1, k))%modulo;
    return dp[n][k];
}

int main(){
   for (int i=0; i<2010; i++)
        for (int j=0; j<2010; j++)
        dp[i][j]=-1;

ll n,m,k;
cin>>n>>m>>k;
if (m==1) {cout<<1; return 0;}

ll ans=m;

if (m==2) {
    cout<<(n-k)*2;
}
else
{
    if (k==0) {cout<<m; return 0;}
ans*=rec(n-1, k);
ans%=modulo;
for (int i=0; i<k; i++)
{ans*=(m-1);
ans%=modulo;}
//ans*=k;
//ans%=modulo;
cout<<ans;
}
    return 0;
}

/**
 * Dont raise your voice, improve your argument.
 * --Desmond Tutu
 */

#include <bits/stdc++.h>
const bool unsyncedio=std::ios::sync_with_stdio(false);
using namespace std;
typedef unsigned int uint;
typedef long long ll;

const int mod=998244353;

int nok[2001][2001];

int nOverK(int n, int k) {
    //if(nok[n][k]>0)
        return nok[n][k];

/*
    if(n==0)
        return 0;
    else if(k==0)
        return 1;
    else
        return nok[n][k]=(nOverK(n-1, k) + nOverK(n-1, k-1))%mod;
*/
}

int main() {
int n, m, k;
    cin>>n>>m>>k;

    int ans=m;
    /* Since there are k color changes, and the first brick can have any color, ans= m*((m-1)^^k) */
    for(int i=0; i<k; i++) {
        ll tmp=1LL * ans * (m-1);
        ans=(int)(tmp%mod);
    }

    /* Since n can be greater than k+1, the number of bricks (next to next) of any of these
     * colors can vary.
     * Number of ways is: How many distributions of n-k-1 items on k+1 buckets are possible?
     * see https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)
     */

    for(int i=1; i<2000; i++) {
        nok[i][0]=1;
        nok[i][i]=1;
        for(int j=1; j<2000; j++) {
            if(i!=j)
                nok[i][j]=(nok[max(1, i-1)][j] + nok[max(1, i-1)][max(0, j-1)])%mod;
        }
    }

    ll tmp=1LL * ans * nok[n-1][k];
    ans=(int)(tmp%mod);
    cout<<ans<<endl;

}

#include <algorithm>
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define mod 998244353
#define for0(i, n) for (int i = 0; i < n; i++)
#define for1(i, n) for (int i = 1; i <= n; i++)
#define forab(i, a, b) for (int i = a; i <= b; i++)
#define tc(t) int t; cin >> t; while (t--)
#define int long long
#define pb emplace_back
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL)
#define in(x) scanf("%intd", &x)
#define rr return 0
#define prec(n) fixed<<setprecision(n)
#define maxheap priority_queue<int>
#define minheap priority_queue<int, vector<int>, greater<int> >
#define inf (int)(1e18)
#define ini(a, i) memset(a, i, sizeof(a))
#define pi pair<pair<int, int>, pair<int, int> >
#define fi first
#define se second
#define endl "\n"
const int MAXN = (int)((1e5) + 10);
int gcd(int a,int b) { if (a == 0) return b; return gcd(b%a, a);}
int max(int a,int b){if(a>b) return a; else return b;}
int min(int a,int b){if(a<b) return a; else return b;}
bool isPrime(int N){ for(int i=2;i*i<=N;++i){if(N%i==0) return false;}return true;}
int cbrt(int x){ int lo=1,hi=min(2000000ll,x);while(hi-lo>1){int mid=(lo+hi)/2;if(mid*mid*mid<x){lo=mid;}else hi=mid;}if(hi*hi*hi<=x) return hi;else return lo;}

const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
const int nax = (int)(1e5+10);
int n,m,k;
int dp[2005][2005];

int func(int ind, int color, int cnt)
{
	if(ind==0 && cnt==k)
		{
			//cout << cnt;
			return 1;
		}
	if(ind==0 && cnt!=k)
		return 0;

	if(ind<0)
		return 0;

	if(dp[ind][color]!=-1)
		return dp[ind][color];

	int ans  = 0;

	for(int i=1;i<=m;i++)
	{
		if(color==i)
		{
			ans += func(ind-1,i,cnt);
			if(ans>=mod) ans = ans%mod;
		}
		else
		{
			ans = ans + func(ind-1,i,cnt+1);
			if(ans>=mod) ans = ans%mod;
		}
	}

	return dp[ind][color] = ans;
}

signed main(){

#ifndef ONLINE_JUDGE
  // for getting input from input.txt
  freopen("input.txt", "r", stdin);
  // for writing output to output.txt
  // freopen("output.txt", "w", stdout);
  #endif
fio;
int t=1;

while(t--)
{
	cin >> n >> m >> k;

	ini(dp,-1);

	int anss=0;
	anss += func(n,1,0);
	if(anss>=mod) anss = anss%mod;

	cout << anss;

}

rr;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>

using namespace std;
using std::cout;
using std::cin;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<pd> vpd;
ll MOD = 998244353;
int main() {
    int n, m, k;
    cin >> n >> m >> k;
    int bricks[n+1][k+1];
    bricks[1][0] = m;
    for(int i = 2; i <= n; i++){
        bricks[i][0] = m;
        for(int c = 1; c <= k; c++){
            bricks[i][c] = bricks[i-1][c-1] * (m-1) + bricks[i-1][c];
        }
    }
    cout << bricks[n][k] << "\n";
    return 0;
}

/*input
3 2 1

*/

//assic value of ('0'-'9') is(48 - 57) and (a-z) is (97-122) and (A-Z) is(65-90) and 32 for space
#include<bits/stdc++.h>
using namespace std;
#define ll          long long
#define pb          push_back
#define	endl		'\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define is_empty(v) v.empty()
#define vs			vector< string >
#define vvi			vector< vector< ll,ll > >
#define all(it,a)   for(auto it=(a).begin();it!=(a).end();it++)
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define inf         1000000007
#define rep(i,a,b)	for(ll int i=a;i<b;i++)
#define repr(i,a,b) for(ll int i=a;i>b;i--)
#define reprr(i,a,b) for(ll int i=a;i>=b;i--)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define sum(v)      accumulate(v.begin(),v.end(),(ll)0)
//map <long long int,long long int> ma;
//set <long long int, greater <long long int> > s;

ll mo=998244353;
// function to find ncr in O(n*r)
ll ncr(ll n,ll r,ll mod)
{
	ll C[r+1] ={0};
	C[0]=1;
	rep(i,1,n+1)
	{
		repr(j,min(i,r),0)
		{
			C[j] = (C[j-1]%mod+C[j]%mod)%mod;
		}
	}

	return C[r];
}
ll nCrModpLucas(ll n, ll r, ll p)
{

   if (r==0)
      return 1;

   ll ni = n%p, ri = r%p;

   return ((nCrModpLucas(n/p, r/p, p)%p)*(ncr(ni, ri, p)%p)) % p;
}

// function to find (x^y)%mod
ll power(ll x,ll y,ll mod)
{
	if(x==1 || x==0)
		return x;
	if(y==1)
		return x%mod;
     if(y==0)
		return 1%mod;
	if(y%2==0)
		return power(((x%mod)*(x%mod))%mod,y/2,mod);
	else
		return ((x%mod)*power(((x%mod)*(x%mod))%mod,(y-1)/2,mod))%mod;

}

int solve()
{
	ll n,k,m;cin>>n>>m>>k;
	ll ans = (nCrModpLucas(n-1,k,mo)*m*power(m-1,k,mo))%mo;
	cout<<ans;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	ll t=1;
	//cin>>t;
	while(t--)
		solve();
}

// In the name of God

#include <bits/stdc++.h>

using namespace std;

#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL);
#define debug(x) cout << #x ": " << x << endl;

#define MOD 998244353

long long fact(long long x) {
	long long ans = 1;
	for(long long i=2; i<=x; i++) {
		ans *= i % MOD;
		ans = ans % MOD;
	}
	return ans%MOD;
}

#define N 30000
// Thanks to great guy who wrote this library :D

long long f[N + 1];

/* O(Log(Y)). */
long long fast_exp(long long x, long long y){
	long long ans = 1; // Base case.

	// Decomposing y in binary. Multiplying the answer by x^1, x^2, x^4, x^8, ...
	while (y > 0){
		// If current bit is set.
		if (y & 1ll){
			ans = (ans * x) % MOD;
		}

		y >>= 1ll; // Next bit.
		x = (x * x) % MOD; // Next power of x.
	}

	return ans;
}

/* O(Log(MOD)). */
long long nck(long long n, long long k){
	long long num, den;

	if (k < 0 or k > n){
		return 0;
	}

	num = f[n];
	den = (f[k] * f[n - k]) % MOD;

	return (num * fast_exp(den, MOD - 2)) % MOD;
}

/* O(N). */
void nck_init(){
	long long i;

	f[0] = 1;

	for (i = 1; i <= N; i++){
		f[i] = (f[i - 1] * i) % MOD;
	}
}

int main() {
	IOS
	long long n, m, k;
	cin >> n >> m >> k;
	nck_init();
	long long ans = 1;
	for(long long i=m; i>=m-k; i--) {
		ans *= i;
		ans = ans % MOD;
	}
	ans *= nck(n-1, k);
	ans = ans % MOD;
	cout << ans;
	return 0;
}

#include<bits/stdc++.h>
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
typedef unsigned long long ll;
using namespace std;
int mod=998244353;
int main(){
    // freopen("i.txt", "r", stdin);
    // freopen("o.txt", "w", stdout);
    vector<vector<int>> dp(2000, vector<int> (2000, 0));
    dp[1][0]=1;
    dp[1][1]=1;
    int n, m, k;
    cin>>n>>m>>k;
    for(int i=2;i<n;i++){
        for(int j=0;j<=i;j++){
            if(j==0||j==i)
                dp[i][j]=1;
            dp[i][j]=(dp[i-1][j-1]+dp[i-1][j])%mod;
        }
    }
    ll ans = 1;
    if(k>0)
        ans = m-1;
    int h=k;
    while(h>1){
        ans = (ans*ans)%mod;
        h/=2;
    }
    if(k%2==1)
        ans = (ans*(m-1))%mod;
    ans = (ll)((((ans*(ll)dp[n-1][k])%mod)*(ll)m)%mod);
    cout<<ans<<endl;

}

#include "bits/stdc++.h"
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
// using namespace __gnu_pbds;
// template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;
/////////////////// TYPES & MACROS ///////////////////////////////
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define all(x) x.begin(),x.end()
#define ff first
#define ss second
#define vv vector
#define exist(s,e) (s.find(e)!=s.end())
#define sz(x) ((int)(x).size())
typedef long long ll;
typedef long double ld;
typedef double dd;
#define int ll
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef pair<ll,ll> pll;
ll INFLL=(ll)4e18, MOD=998244353;
const int INF=0x3f6f6f6f;
//////////////////// DEBUG /////////////////////////////////////////
#define D(x) cerr<<#x<<" is:\t"<<x<<'\n';
#define DD(x,y) cerr<<'('<<#x<<','<<#y<<") are:\t"<<x<<' '<<y<<'\n';
#define DDD(x,y,z) cerr<<'('<<#x<<','<<#y<<','<<#z<<") are:\t"<<x<<' '<<y<<' '<<z<<'\n';
auto tStart = chrono::system_clock::now(); //freopen("op.txt","w",stdout);
/////////////////// VARIABLES & FUNCTIONS//////////////////////////
vv<vv<int>> adj; vi vis, color, level;
int dx8[]={0,1,1,1,0,-1,-1,-1}, dy8[]={1,1,0,-1,-1,-1,0,1},dx4[]={0,1,0,-1}, dy4[]={1,0,-1,0};
inline ll mexp(ll x,ll n,ll m=MOD){ll res=1;x%=m;while(n){if(n&1)res=(res*x)%m;n>>=1;x=(x*x)%m;}return res;}
inline bool ispow2(ll x){ return x && (!(x&(x-1)));}
inline ll gcd(ll a, ll b){while (a>0 && b>0){if(a>b)a%=b;else b%=a;}return a+b;}

//////////////////// MAIN STARTS //////////////////////////////////
int32_t main(void){
ios_base::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);
cout<<fixed;cerr<<fixed; cout<<setprecision(10); cerr<<setprecision(3);
mt19937 genr(chrono::high_resolution_clock::now().time_since_epoch().count());

ll n,m,k; cin>>n>>m>>k;
ll ans=1;
vv<ll> inv(2e3+1), fac(2e3+1);
inv[0]=inv[1] = 1;
for(int i = 2; i <= 2e3; ++i)
    inv[i] = (MOD - (MOD/i) * inv[MOD%i] % MOD) % MOD;
fac[0]=1; for(int i=1;i<=2e3;++i) fac[i]=(fac[i-1]*i)%MOD;

ans=(ans*m)%MOD;
ans=(ans*mexp(m-1,k,MOD));
ans=(ans*fac[n-1])%MOD;
ans=(ans*inv[k])%MOD;
ans=(ans*inv[n-1-k])%MOD;
cout<< ans <<'\n';

#ifdef DEBUG
auto _diff=chrono::system_clock::now()-tStart;
cerr<<"\nExecution time: "<<chrono::duration<dd,milli>(_diff).count()<<" ms.\n";
#endif
return 0;
}

#include <bits/stdc++.h>

#define int unsigned long long

const int MOD = 998244353, N = 2010;
int n, m, k, f[N];

int power(int base, int exp) {
  int ans = 1;
  while (exp) {
    if (exp&1)
      ans = (ans*base)%MOD;
    base = (base*base)%MOD;
    exp>>=1;
  }
  return ans%MOD;
}

int inv(int a) {
  a %= MOD;
  if (a < 0) a+= MOD;
  int b = MOD, u = 0, v = 1;
  while(a) {
    int t = b/a;
    b -= t*a; std::swap(a, b);
    u -= t*v; std::swap(u, v);
  }
  if (u < 0) u += MOD;
  return u%MOD;
}

int32_t main() {
  scanf("%llu%llu%llu", &n, &m, &k);

  f[0] = 1;
  for (int i = 1; i < N; i++)
    f[i] = (f[i-1]*i)%MOD;

  //printf("(%llu/(%llu*%llu)) * ", f[n-1], f[k], f[n-(k+1)]);
  //printf("%llu * (%llu^%llu) = ", m, m-1, k);
  //printf("%llu\n", ((f[n-1]/(f[k]*f[n-(k+1)]))*m*power(m-1, k))%MOD);
  printf("%llu\n", (f[n-1]*inv(f[k]*f[n-k-1])*m*power(m-1, k))%MOD);
  return 0;
}

//Mir_123
#include<bits/stdc++.h>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<iterator>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define ub upper_bound
#define lb lower_bound
#define bin binary_search
#define vmin *min_element
#define vmax *max_element
#define mod 998244353
//Use set if your want your array to be auto sorted
//sort takes log(N) time
int main(void)
{
	ll n,m,k;
	cin>>n>>m>>k;
	if(m==1)
	{
		cout<<0;
		return 0;
	}
	vector<ll>dp(k+1,0);
	dp[0]=m;
	for(ll i=1;i<n;i++)
	{
		for(ll j=min(k,i);j>0;j--)
		{
			dp[j]=(dp[j]%mod+(dp[j-1]%mod*((m-1)%mod))%mod)%mod;
		}
	}
	cout<<dp[k];
	return 0;
}

#include <iostream>
using namespace std;

#define Q 998244353
typedef unsigned long long ull;

ull Cd(ull n, ull k);

int main()
{
	ull n, m, k;
	cin >> n >> m >> k;
	ull places = Cd(n - 1, k);

	ull ans = (places * m) % Q;
	for (ull i = 0; i < k; i++)
	{
		ans = (ans * (m - 1)) % Q;
	}
	cout << ans << "\n";

	return 0;
}

ull Cd(ull n, ull k)
{
	ull C[2000][2000];
	for (int i = 1; i <= n; i++)
	{
		C[i][0] = 1;
		C[i][i] = 1;
		for (int j = 1; j < i && j <= k; j++)
		{
			C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % Q;
			//cout << "C[" << i << "][" << j << "] = " << C[i][j] << "\n";
		}
	}
	return C[n][k];
}

/*
@author: sharrad99
*/
#include<bits/stdc++.h>
using namespace std;
const int mod = 998244353;
// int dp[2002][2002];
int main(){

	#ifndef ONLINE_JUDGE
	freopen("C:\\Users\\sharr\\Documents\\Input.txt", "r", stdin);
	freopen("C:\\Users\\sharr\\Documents\\Output.txt", "w", stdout);
	#endif

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	int n, m, k;
	cin >> n >> m >> k;

	vector<vector<int>> dp((n + 1), vector<int>((k + 1), 0));
	dp[1][0] = m;
	for(int i = 1; i <= n; i++) {
		for(int j = 0; j <= k; j++) {
			dp[i][j] += dp[i - 1][j];
			dp[i][j] %= mod;
			if(j == 0) continue;
			dp[i][j] += (dp[i - 1][j - 1] * (m - 1));
			dp[i][j] %= mod;
		}
	}

	cout << dp[n][k] << '\n';
}

#include<stdio.h>
#include<algorithm>
using namespace std;
typedef long long ll;

const int SIZE=2009;
const int MOD=988244353;
ll dp[SIZE][SIZE]={0};
int N,M,K;
ll dfs(int n,int k){
    // printf("%d %d\n",n,k);
    if(n<=k) return 0;

    if(dp[n][k]) return dp[n][k];
    ll &ret=dp[n][k];
    if(n==0) return ret=M;

    ret=dfs(n-1,k);
    if(k>0) ret+=dfs(n-1,k-1)*(M-1);
    ret%=MOD;
    return ret;
}

int main(){
     scanf("%d %d %d",&N,&M,&K);
     dp[1][0]=M;

    printf("%d\n",dfs(N,K)%MOD);

   return 0;
}

#include<bits/stdc++.h>
using namespace std;
int dp[2001][2001];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n,m,k,i,j,mod=998244353;
    long long int ans;
    cin>>n>>m>>k;
    if(k>=n)
    {
        cout<<0;
        return 0;
    }
    for(i=1;i<=n;i++)
        dp[0][i]=1;
    for(i=1;i<=k;i++)
    {
        for(j=i+1;j<=n;j++)
        {
            dp[i][j]=(dp[i][j-1]+dp[i-1][j-1])%mod;
        }
    }
    ans=(dp[k][n]*m)%mod;
    for(i=1;i<=k;i++)
        ans=(ans*(m-1))%mod;
    cout<<ans;
}

#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define _ ios::sync_with_stdio(false);cin.tie(0);
#define MAX 2010

using namespace std;

typedef long long int ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vector<int> > vvi;
typedef vector<vii> vvii;

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fll;

ll mod = 998244253;
ll pd[MAX][MAX];
ll n, m, k;

ll solve(int pos, int obj){
    if(pd[pos][obj] != -1)
        return pd[pos][obj];
    if(obj == k)
        return pd[pos][obj] = 1;
    if(obj > k)
        return pd[pos][obj] = 0;
    if(pos == n-1)
        return pd[pos][obj] = 0;
    ll tot = solve(pos+1, obj);
    ll aux = ((m-1)*solve(pos+1, obj+1))%mod;
    tot = (tot+aux)%mod;

    return pd[pos][obj] = tot;
}

int main(){_

    for(int i = 0; i < MAX; i++)
        for(int j = 0; j < MAX; j++)
            pd[i][j] = -1;
    cin >> n >> m >> k;

    ll ans = (m*solve(0,0))%mod;
    cout << ans << endl;

}

#include<bits/stdc++.h>
using namespace std;

/////////////////////////////////////////////////////////////////////
long long  nCrModpDP(long long  n, long long  r, long long  p)
{

    long long  C[r+1];
    memset(C, 0, sizeof(C));

    C[0] = 1;

    for (long long  i = 1; i <= n; i++)
    {

        for (long long  j = min(i, r); j > 0; j--)
              C[j] = (C[j] + C[j-1])%p;
    }
    return C[r];
}
long long  nCrModpLucas(long long  n, long long  r, long long  p)
{
   if (r==0)
      return 1;
   long long  ni = n%p, ri = r%p;

   return (nCrModpLucas(n/p, r/p, p) *nCrModpDP(ni, ri, p)) % p;
}
int largestPower(int n, int p)
{
    // Initialize result
    int x = 0;

    // Calculate x = n/p + n/(p^2) + n/(p^3) + ....
    while (n) {
        n /= p;
        x += n;
    }
    return x;
}

// Utility function to do modular exponentiation.
// It returns (x^y) % p
int power(int x, int y, int p)
{
    int res = 1; // Initialize result
    x = x % p; // Update x if it is more than or
    // equal to p
    while (y > 0) {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res * x) % p;

        // y must be even now
        y = y >> 1; // y = y/2
        x = (x * x) % p;
    }
    return res;
}

// Returns n! % p
long long modFact(long long n, long long p)
{
    if (n >= p)
        return 0;

    long long res = 1;

    // Use Sieve of Eratosthenes to find all primes
    // smaller than n
    bool isPrime[n + 1];
    memset(isPrime, 1, sizeof(isPrime));
    for (long long i = 2; i * i <= n; i++) {
        if (isPrime[i]) {
            for (long long j = 2 * i; j <= n; j += i)
                isPrime[j] = 0;
        }
    }

    // Consider all primes found by Sieve
    for (long long i = 2; i <= n; i++) {
        if (isPrime[i]) {
            // Find the largest power of prime 'i' that divides n
            long long k = largestPower(n, i);

            // Multiply result with (i^k) % p
            res = (res * power(i, k, p)) % p;
        }
    }
    return res;
}
int main()
{
  int n,m,k;
  cin>>n>>m>>k;
  cout<<(((nCrModpLucas(n-1,k,998244353 )*nCrModpLucas(m,k+1,998244353))%998244353)*modFact(k+1,998244353))%998244353;

  return 0;
}

#include "bits/stdc++.h"
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
// using namespace __gnu_pbds;
// template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;
/////////////////// TYPES & MACROS ///////////////////////////////
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define all(x) x.begin(),x.end()
#define ff first
#define ss second
#define vv vector
#define exist(s,e) (s.find(e)!=s.end())
#define sz(x) ((int)(x).size())
typedef long long ll;
typedef long double ld;
typedef double dd;
#define int ll
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef pair<ll,ll> pll;
ll INFLL=(ll)4e18, MOD=1e9+7;
const int INF=0x3f6f6f6f;
//////////////////// DEBUG /////////////////////////////////////////
#define D(x) cerr<<#x<<" is:\t"<<x<<'\n';
#define DD(x,y) cerr<<'('<<#x<<','<<#y<<") are:\t"<<x<<' '<<y<<'\n';
#define DDD(x,y,z) cerr<<'('<<#x<<','<<#y<<','<<#z<<") are:\t"<<x<<' '<<y<<' '<<z<<'\n';
auto tStart = chrono::system_clock::now(); //freopen("op.txt","w",stdout);
/////////////////// VARIABLES & FUNCTIONS//////////////////////////
vv<vv<int>> adj; vi vis, color, level;
int dx8[]={0,1,1,1,0,-1,-1,-1}, dy8[]={1,1,0,-1,-1,-1,0,1},dx4[]={0,1,0,-1}, dy4[]={1,0,-1,0};
inline ll mexp(ll x,ll n,ll m=MOD){ll res=1;x%=m;while(n){if(n&1)res=(res*x)%m;n>>=1;x=(x*x)%m;}return res;}
inline bool ispow2(ll x){ return x && (!(x&(x-1)));}
inline ll gcd(ll a, ll b){while (a>0 && b>0){if(a>b)a%=b;else b%=a;}return a+b;}

//////////////////// MAIN STARTS //////////////////////////////////
int32_t main(void){
ios_base::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);
cout<<fixed;cerr<<fixed; cout<<setprecision(10); cerr<<setprecision(3);
mt19937 genr(chrono::high_resolution_clock::now().time_since_epoch().count());

MOD=998244353;
ll n,m,k; cin>>n>>m>>k;
ll ans=1;
for(int i=1;i<=n-1;++i){
    ans=(ans*i)%MOD;
}

ll b=1,c=1;
for(int i=1;i<=k;++i) b=(b*i)%MOD;
for(int i=1;i<=n-k-1;++i) c=(c*i)%MOD;
b=mexp(b,MOD-2,MOD);
c=mexp(c,MOD-2,MOD);
ans=(((ans*b)%MOD)*c)%MOD;

ans=(ans*mexp(m-1,k,MOD));
ans=(ans*m)%MOD;
cout<< ans <<'\n';

#ifdef DEBUG
auto _diff=chrono::system_clock::now()-tStart;
cerr<<"\nExecution time: "<<chrono::duration<dd,milli>(_diff).count()<<" ms.\n";
#endif
return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define pb push_back
#define pf pop_front
typedef long long int ll;
// fflush(stdout);
const int N=3e3;

ll dp[N];

ll mod=998244353 ;

ll kam[N];
int main(){
    ll n , m , k;
    cin >> n >> m >> k;
    ll t=1;
    for (int i=1;i<=k+1;i++){
        t*=m;
        t%=mod;
        dp[i]=t;
        //cout << dp[i] << endl;

    }

    ll o=1;
    kam[0]=1;
    for (ll i=1;i<=n;i++){
        o*=m-1;
        o%=mod;
        kam[i]=o;
    }
    for (ll i=k+2;i<=n;i++){
        ll q=0;
        ll w=0;
        for (ll j=i-k;j<=i;j++){
            w=0;
            w+=dp[j-1];
            w*=kam[i-j];
            //cout << kam[i-j] << " jhkl" << endl;
            q+=w;
            q%=mod;
        }

        dp[i]=(q%mod+mod)%mod;
        //cout << dp[i] << endl;

    }
    ll y=dp[n];
    //cout << dp[n] << endl;
    if (k!=0){
        k--;
        //ll n , m , k;
        //cin >> n >> m >> k;
        ll t=1;
        for (ll i=1;i<=k+1;i++){
            t*=m;
            t%=mod;
            dp[i]=t;
            //cout << dp[i] << endl;

        }

        ll o=1;
        for (ll i=1;i<=n;i++){
            o*=m-1;
            o%=mod;
            kam[i]=o;
        }
        for (ll i=k+2;i<=n;i++){
            ll q=0;
            ll w=0;
            for (ll j=i-k;j<=i;j++){
                w=0;
                w+=dp[j-1];
                w*=kam[i-j];
                q+=w;
                q%=mod;
            }

            dp[i]=(q%mod+mod)%mod;
            //cout << dp[i] << endl;

        }
        ll w=dp[n];
        cout << (y-w)%mod;
        //cout << dp[n] << endl;
    }
    else{
        cout << y%mod;
    }
}

#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
typedef long long int ll;
const ll M=998244353;

ll nCrModp(ll n, ll r)
{

    ll C[r+1];
    memset(C, 0, sizeof(C));

    C[0] = 1; // Top row of Pascal Triangle

    // One by constructs remaining rows of Pascal
    // Triangle from top to bottom
    for (ll i = 1; i <= n; i++)
    {
        // Fill entries of current row using previous
        // row values
        for (ll j = min(i, r); j > 0; j--)

            // nCj = (n-1)Cj + (n-1)C(j-1);
            C[j] = (C[j] + C[j-1]);
    }
    return C[r];
}

int main(){
	fast;
	ll n,m,k;
	cin>>n>>m>>k;
	ll ans=nCrModp(n-1,k)%M;
	ans*=pow(m-1,k)*m;
	cout<<ans;
	return 0;
}

#include<bits/stdc++.h>
#define MOD 998244353
#define F first
#define S second
#define PI 3.14159265
typedef long long ll;
typedef unsigned long long ull;
using namespace std;

ull factorial(ull n)
{
    if (n == 0)
       return 1;
    return (n * factorial(n - 1)) % MOD;
}

ull pow_mod(ull n, ull a) {
    ull ret = 1;
    while (n > 0) {
        if (n & 1) ret = ret * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return ret;
}

int n, m, k;

int main() {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin >> n >> m >>k;
    cout << (k == 0 ? m : ((((((factorial(n - 1) / (factorial(k)) % MOD) / factorial(n - 1 - k)) % MOD) * m) % MOD) * pow_mod(m - 1, k)) % MOD);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#if DEBUG && !ONLINE_JUDGE
    #include "/home/chaman/Desktop/cpp/debug.h"
#else
    #define debug(args...)
    #define DBG(x...)
#endif
typedef     long long int                        ll;
typedef     long double                          ld;
typedef     vector<ll>                           vi;
typedef     pair<ll,ll>                          pii;
typedef     vector<pii>                          vpi;
typedef     vector<vi>                           vvi;
typedef     map<ll,ll>                           mii;
typedef     map<char,ll>                         mci;
typedef     priority_queue<ll>                   pqi;
typedef     priority_queue<pii>                  pqii;
typedef     priority_queue<ll,vi,greater<ll>>    pqmini;
typedef     priority_queue<pii,vpi,greater<pii>> pqminpi;

#define     fi              first
#define     se              second
#define     sz(a)           (ll)((a).size())
#define     rep(i,n)        for(ll i=0;i<n;i++)
#define     repA(i,a,n)     for(auto i=a;i<=n;i++)
#define     repD(i, a, n)   for(auto i = a; i >= (n); --i)
#define     trav(a, x)      for(auto& a : x)
#define     all(x)          x.begin(), x.end()
#define     fill(a)         memset(a, 0, sizeof (a))
#define     pb              push_back
#define     MOD             998244353
#define     PI              3.14159265359
#define     EULER           2.7182818284

//////////////////////////////////////////////////////////////////////

ll binomialCoeff(ll n, ll k)
{
    ll C[k+1];
    memset(C, 0, sizeof(C));

    C[0] = 1;  // nC0 is 1

    for (ll i = 1; i <= n; i++)
    {
        // Compute next row of pascal triangle using
        // the previous row
        for (ll j = min(i, k); j > 0; j--){
                    C[j] = C[j] + C[j-1];
                    C[j]%=MOD;
                }
    }
    return C[k];
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // ifstream in("input.txt");
    // streambuf *cinbuf = std::cin.rdbuf(); //save old buf
    // cin.rdbuf(in.rdbuf()); //redirect std::cin to in.txt!
    // ofstream out("output.txt");
    // streambuf *coutbuf = std::cout.rdbuf(); //save old buf
    // cout.rdbuf(out.rdbuf()); //redirect std::cout to out.txt!
    cout.precision(20);
    ll n,m,k;
    cin>>n>>m>>k;
    k++;
    ll ans = 1;
    if(m<k){
        cout<<0<<endl;
        return 0;
    }
    // rep(i,n-k){
    //     ans*=k;
    //     ans%=MOD;
    // }
    ans*=binomialCoeff(m,k);
    ans%=MOD;
    ans*=binomialCoeff(n-1,k-1);
    ans%=MOD;
    repA(i,1,k){
        ans*=i;
        ans%=MOD;
    }
    cout<<ans;

    debug("\nRuntime = " + to_string((ld)clock()/(ld)CLOCKS_PER_SEC));
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define all(v) v.begin(),v.end()
#define count_ones __builtin_popcountl
#define int long long int
#define endl "\n"
#define mod(x,m) ((x%m+m)%m)
#define limit 998244353
#define fori(x,n) for(int i=x;i<n;i++)
#define forj(y,m) for(int j=y;j<m;j++)
#define fastio std::ios::sync_with_stdio(false)
#define seed srand(time(0))
#define  oo 0x3f3f3f3f
#define two pair<int,int>
#define three pair<int,pair<int,int> >
#define f first
#define s second
#define max(x,y) max((int)x,(int)y)
#define min(x,y) min((int)x,(int)y)
#define max3(x,y,z) max(x,max(y,z))
#define min3(x,y,z) min(x,min(y,z))
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define input_from_file freopen("inp.txt", "r", stdin)
#define output_to_file freopen("out.txt", "w" , stdout)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define clock_end cerr << endl << setprecision(10) << fixed << (double)(clock() - clk) / CLOCKS_PER_SEC
#define clock_begin  clock_t clk = clock()
const int N = 1e5+5;

int gcdExtended(int a, int b, int *x, int *y)
{
    // Base Case
    if (a == 0)
    {
        *x = 0, *y = 1;
        return b;
    }

    int x1, y1; // To store results of recursive call
    int gcd = gcdExtended(b%a, a, &x1, &y1);

    // Update x and y using results of recursive
    // call
    *x = y1 - (b/a) * x1;
    *y = x1;

    return gcd;
}

int modInverse(int a, int m)
{
    int x, y;
    int g = gcdExtended(a, m, &x, &y);

        // m is added to handle negative x
        int res = (x%m + m) % m;
        return res;
}

int fact(int n)
{  int tmp=1;
   fori(1,n+1)
   tmp=(tmp*i)%limit;
   return tmp;
}
signed main() {

    //input_from_file;
    fastio;

    int n,m,k;
    cin>>n>>m>>k;

    int ans = m;

    fori(1,k+1)
    ans = (ans*(m-1))%limit;

    k=k+1;
    n=n-k;

    ans = (ans*fact(n+k-1));
    ans%=limit;
    if(n > 1)
    ans = ans*modInverse(n,limit);
    ans%=limit;
    if(k-1 > 1)
    ans = ans*modInverse(k-1,limit);
    ans%=limit;
    cout<<ans<<endl;

}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define inf 1e9
#define mod 998244353
#define MX 100005

ll nCrModp(ll n, ll r, ll p)
{
    ll C[r+1];
    memset(C, 0, sizeof(C));

    C[0] = 1;

    for (ll i = 1; i <= n; i++)
    {
        for (ll j = min(i, r); j > 0; j--)
            C[j] = (C[j] + C[j-1]) % p;
    }

    return C[r];
}

ll bigmod(ll b, ll p)
{
	if(p == 0) return 1;
	else if(p % 2 == 0) {
		ll ret = bigmod(b, p/2) % mod;
		return (ret*ret) % mod;
	}
	return (b * bigmod(b, p-1)) % mod;
}

int main()
{
	ll n, m, k, color, comb, cnt, ans;
	cin>>n>>m>>k;

	if(k == 0) {
		cout<<m<<endl;
		return 0;
	}

	color = ((m-1) * bigmod(m, k-(k/2)) * bigmod(m-1, k/2)) % mod;

	comb = nCrModp(n-1, k, mod);

	cnt = 0;
	for(int i = m+1; i <= k; i++) {
		cnt = (cnt + nCrModp(n-1-i, k-i, mod)) % mod;
	}

	comb = (comb - cnt) % mod;
//	cout<<color<<" "<<comb<<" "<<cnt<<endl;
	ans = (comb * color) % mod;

	cout<<ans<<endl;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define BUFF ios_base::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define MOD 998244353

ll powmod(ll base, ll exp, ll modulus) {
	base %= modulus;
	ll result = 1;
	while (exp > 0) {
		if (exp & 1) result = (result * base) % modulus;
		base = (base * base) % modulus;
		exp >>= 1;
	}
  	return result;
}

int main(){
	BUFF
	int n, m, k;

	cin >> n >> m >> k;

	ll pascal[2001][201];
	memset(pascal, 0, sizeof(pascal));
	pascal[0][0] = 1;
	pascal[0][1] = 0;
	for(int i = 1; i<=n; i++){
		pascal[i][0] = 1;
		for(int j = 1; j<=i; j++){
			pascal[i][j] = (pascal[i-1][j] + pascal[i-1][j-1])%MOD;
		}
	}
	ll ans;
	if(k>0) ans = (m * powmod(m-1, k, MOD))%MOD;
	else ans = m;

	ans = (ans * pascal[n-1][k])%MOD;

	cout << ans << '\n';

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
#define PI 3.1415926535897932384626433832795
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define trav(x,v) for (auto &x : v)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= (a); i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)

#define pv(v) trav(x, v) cout << x << " "; cout << endl; // print vector/array
#define pvv(vv) trav(xx, vv){pv(xx);} // print 2-d vector/2-d array
#define pm(m) trav(x, m) cout << x.F << ":" << x.S << " "; cout << endl; //print map/lookup table

const int MOD = 1000000007;
ll modpow(ll a,ll b,ll m){
    if(a==0)
        return 1;
    ll res = 1;
    a = a%m;
    while(b>0){
        if(b%2)res = (res*a) % m;
        b = b>>1;
        a = (a*a)%m;
    }
    return res;
}
ll modInverse(ll n, ll p) {
	return modpow(n, p-2, p);
}

ll nCrModPFermat(ll n, ll r, ll p) {
    if (r==0)
        return 1;
    ll fac[n+1];
    fac[0] = 1;
    for (int i=1 ; i<=n; i++)
        fac[i] = fac[i-1]*i%p;
    return (fac[n]* modInverse(fac[r], p) % p *
                modInverse(fac[n-r], p) % p) % p;
}

const ll md = 998244353;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n,m,k;
    cin>>n>>m>>k;
    if(n==1){
        cout<<m;
        return 0;
    }
  /** if(n==2){
        if(k==1)
            cout<<m*(m-1);
        else
            cout<<m;
    }**/
    if(m==1){
        if(k==0)
            cout<<1;
        else
            cout<<0;
    }
    else{
        if(k==0){
            cout<<m;
            return 0;
        }
        ll nseg = nCrModPFermat(n-1,k,md);
        // cout<<nseg<<endl;
        // cout<<modpow(m-1,k,md);
        ll ans = (nseg*((ll)m*modpow(m-1,k,md)))%md;
        cout<<ans;
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define what_is(x) cerr << #x << " is " << x << endl;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
typedef long long ll;
const int N = 2e3+5;
const int INF = 1e9;
const int MOD = 998244353;
#define int ll

int n, m, k;
int dp[N][N];
int pow(int x, int y){
	ll ans = 1;
	while(y--){
		ans *= x;
		if (ans >= MOD) ans -= MOD;
	}
	return ans;
}
int32_t main()
{
	IOS
	//freopen("input.txt", "r", stdin);
	cin >> n >> m >> k;
	int fact[N], fact_inv[N], inv[N];
	inv[1] = 1;
	for(int i=2; i<N; i++) {
		inv[i] = MOD - (MOD/i)*inv[MOD%i] % MOD;
	}
	fact[0] = fact_inv[0] = 1;
	for(int i=1; i<N; i++){
		fact[i] = i*fact[i-1] % MOD;
		fact_inv[i] = fact_inv[i-1]*inv[i] % MOD;
	}
	auto comb = [&](int n, int k){
		if (n<0 || k<0 || n < k) return 0LL;
		return fact[n]*fact_inv[n-k] % MOD *fact_inv[k] % MOD;
	};
	int ans = comb(n-1, k)*m % MOD*pow(m-1, k) % MOD;
	cout << ans << endl;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long int con=998244353,v[2005][2005];
long long int per(long long int i,long long int j)
{
    if(i<j)return 0;
    if(j==1)return i;
    if(j==0 || i==j)return 1;
    if(v[i][j]==-1) v[i][j]=(per(i-1,j) + per(i-1,j-1))%con;
    // cout<<v[i][j]<<" "<<i<<" "<<j<<endl;
    return v[i][j];
}
long long int power(long long int x,long long int y)
{
    unsigned long long int temp;
    if(y<0)return 0;
    if( y == 0 || x==0)
        return 1;
    temp = power(x, y/2)%con;
    // cout<<temp<<endl;
    if (y%2 == 0)
        return (temp*temp)%con;
    else
        return (x*(temp*temp)%con)%con;
}
int main()
{
    long long int n,m,k,i,j;
    for(i=0;i<2005;i++)for(j=0;j<2005;j++)v[i][j]=-1;
    cin>>n>>m>>k;
    long long int c=m;
    c=(c*power(m-1,k))%con;
    // cout<<c<<" "<<per(n-1,k)<<endl;
    cout<<(c*per(n-1,k))%con<<endl;
    return 0;
}

#include <bits/stdc++.h>
#define MOD 998244353
using namespace std;
//(n-1)Ck*m*(m-1)^k
int power(int x, unsigned int y, int p)
{
    int res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;

        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
int fact(int x)
{
    int res=1;
    for(int i=1;i<=x;i++)
    res=(res*i)%MOD;
    return res;
}
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,m,k;cin>>n>>m>>k;
    if(k==0)
    {
        cout<<m;return 0;
    }
    int y=((fact(n-1)*power(fact(k),MOD-2,MOD))%MOD*power(fact(n-1-k),MOD-2,MOD))%MOD;
    cout<<(((y*m)%MOD)*power(m-1,k,MOD))%MOD;
	return 0;
}

#include <iostream>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <random>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <ctime>
#include <climits>
#include <string>
#include <cassert>

using namespace std;

mt19937 rnd((uint64_t) new char);

int64_t rand(int64_t x, int64_t y) { return rnd() % (y - x + 1) + x; }

template<typename t>
t min(t a) {
    return a;
}

template<typename t, typename... ts>
t min(const t &a, const ts &... as) {
    t tmp = min(as...);
    return tmp < a ? tmp : a;
}

template<typename t>
t max(t a) {
    return a;
}

template<typename t, typename... ts>
t max(const t &a, const ts &... as) {
    t tmp = max(as...);
    return tmp > a ? tmp : a;
}

void prn(ostream &os) {
    os << '\n';
}

void prn() {
    cout << '\n';
}

template<typename t, typename... ts>
void prn(ostream &os, const t &a, const ts &... b) {
    os << a << ' ';
    prn(os, b...);
}

template<typename t, typename... ts>
void prn(const t &a, const ts &... b) {
    cout << a << ' ';
    prn(cout, b...);
}

#ifdef LOCAL

template<typename... ts>
void deb(const ts &... b) {
    prn(cerr, "DEBUG", b...);
}

#else
template<typename... ts>
void deb(const ts&... b){

}
#endif

#define vec_in(v) for (auto& i : v) cin >> i;
template <typename T>
void vec_out(const T &v) {
    auto end = v.end();
    --end;
    for (auto it = v.begin(); it != v.end(); it++) {
        cout << *it << " \n"[it == end];
    }
}

#define repab(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) repab(i, 0, n)
#define repab_(i, a, b) for (int i = b - 1; i >= a; i--)
#define rep_(i, n) repab_(i, 0, n)
#define infc for(;;)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using vi = vector<int>;
using vll = vector<int64_t>;
using pii = pair<int, int>;
using pll = pair<int64_t, int64_t>;
using ll = int64_t;
using ull = uint64_t ;
//------------------------------------------------------------------------------

const ull mod = 998244353;

int32_t main() {
#ifdef LOCAL
#else
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
#endif
    ull n, m, k;
    cin >> n >> m >> k;
    vector<vector<ull>> prefix(n + 1, vector<ull>(k + 1));
    for (int i = 1; i <= n; i++){
        prefix[i][0] += i;
        prefix[i][0] %= mod;
        for (int j = 1; j <= k; j++){
            prefix[i][j] = prefix[i - 1][j];
            prefix[i][j] += prefix[i - 1][j - 1];
            prefix[i][j] %= mod;
        }
    }
    ull kek = m;
    for (int i = 0; i < k; i++){
        kek *= (m - 1);
        kek %= mod;
    }
    cout << ((prefix[n][k] - prefix[n - 1][k]) * kek) % mod << '\n';
}

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
long long int coc(long long int n,long long int r)
{
    int i, res;
    if(r > 0)
        return (n/r)*coc(n-1,r-1);
    else
        return 1;
}
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    int n,m,k,i,j;
    long long int ans=1;
    cin>>n>>m>>k;
    ans=m;
    for(i=0;i<k;i++)
    {
        ans*=(m-1);
        ans%=998244353;
    }
    ans*=(coc((long long int)n-1,(long long int)k)%998244353);
    ans%=998244353;
    cout<<ans;
}

//GO
//OUT
//FROM
//MY
//CODE
//FUCKIN
//JOPA

#include <bits/stdc++.h>

#define mdla 1000000007
#define mdlb 998244353
#define ll long long
using namespace std;

int main()
{
    int n, m, k;
    cin >> n >> m >> k;
    if (k == 0) {
        cout << m;
        return 0;
    } else {
        if (m == 1) {
            cout << 1;
            return 0;
        } else {
            ll x = 1;
            for (int i = 0; i < k; i++) {
                x = x * (m - 1);
                x = x % mdlb;
            }
            for (int i = 0; i < n - k; i++) {
                x = x * m;
                x = x % mdlb;
            }
            cout << x;
        }
    }
}

#include<bits/stdc++.h>
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
typedef unsigned long long ll;
using namespace std;
int mod=998244353;
int main(){
    // freopen("i.txt", "r", stdin);
    // freopen("o.txt", "w", stdout);
    vector<vector<int>> dp(2000, vector<int> (2000, 0));
    dp[1][0]=1;
    dp[1][1]=1;
    int n, m, k;
    cin>>n>>m>>k;
    for(int i=2;i<n;i++){
        for(int j=0;j<=i;j++){
            if(j==0||j==i)
                dp[i][j]=1;
            dp[i][j]=(dp[i-1][j-1]+dp[i-1][j])%mod;
        }
    }
    ll ans = 1;
    if(k>0)
        ans = m-1;
    int h=k;
    while(h>1){
        ans = (ans*ans)%mod;
        h/=2;
    }
    if(k%2==1)
        ans = (ans*(m-1))%mod;
    ans = (((ans*dp[n-1][k])%mod)*m)%mod;
    cout<<ans<<endl;

}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const ll MOD = 998244353;
ll fac[2005][2005];

void read(ll &x)
{
	x = 0;ll f = 1;char ch = getchar();
 	while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
 	while(ch >= '0' && ch <= '9'){x = x * 10 + ch - '0';ch = getchar();}
 	x *= f;
}

ll n,m,k,cl = 1,fk= 1,sk = 1;

int cal(int x)
{
	return x&1?(x / 2 + 1):x /  2;
}

int main()
{
    read(n);read(m);read(k);
    for(int i = 1;i <= 2000;++i)fac[i][i] = 1;
    for(int i = 1;i <= 2000;++i)
    	for(int j = i - 1;j >= cal(i);--j)
    		fac[i][j] = (fac[i][j + 1] * (j + 1))%MOD;

	for(int i = 1;i <= 2000;++i)
    	for(int j = 1;j*2 <=i;++j)
			fac[i][j] = fac[i][i - j];

    for(int i = 1;i <= k + 1;++i)
    {
    	if(i == 1)cl = (cl * m)%MOD;
    	else cl = (cl * (m - 1))%MOD;
    }
    if(k != 0)
		fk = fac[n - 1][k];
	printf("%I64d\n",(fk * cl ) % MOD);
    return 0;
}

#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <iomanip>
#include <bitset>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>

using namespace std;

const int N = 5005;
const int mod = 998244353;

int fp(int a, int b) {
  int ans = 1;
  while (b > 0) {
    if (b & 1) {
      ans = (1ll * ans * a) % mod;
    }
    b >>= 1;
    a = (1ll * a * a) % mod;
  }
  return ans;
}

int fac[N];

int inv(int x) {
  return fp(x, mod - 2);
}

int comb(int n, int k) {
  int ans = (1ll * fac[n] * inv(fac[n - k])) % mod;
  return ans;
}

int main() {
  int n, m, k;
  cin >> n >> m >> k;
  fac[0] = 1;
  for (int i = 1; i < N; i++) {
    fac[i] = (1ll * fac[i - 1] * i) % mod;
  }
  int ans = (1ll * comb(n - 1, k) * m) % mod;
  for (int i = 0; i < k; i++) {
    ans = (1ll * ans * (m - 1)) % mod;
  }
  cout << ans << endl;
  return 0;
}

#include<bits/stdc++.h>
#define int long long
#define sir_dratuti cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); setlocale(LC_ALL,"ru");

using namespace std;

const int inf=998244353;
vector<vector<int> > CC;

int modexp(int x, int y, int n)
{
  if (y==0) return 1;
  int z=modexp(x,y/2,n);
  if (y % 2 == 0)
    return (z*z)%n;
  else
    return (x*z*z)%n;
}

int C(int n, int k)
{
    if (k==0||k==n)
        return 1;
    if(CC[n-1][k-1]==0){
        CC[n-1][k-1]=C(n-1,k-1);
    }
    if(CC[n-1][k]==0){
        CC[n-1][k]=C(n-1,k);
    }
    return (CC[n-1][k-1]+CC[n-1][k])%inf;
}

main() {
    sir_dratuti;
	int n,m,k;
	cin>>n>>m>>k;
	CC.resize(n+1);
    for(int i=0;i<=n;i++){
        CC[i].resize(n);
    }
    int c=C(n-1,k);
    c%=inf;
    int u=modexp(m-1,k,inf);
    u=(m*u)%998244353;
    u=(u*c)%998244353;
    cout<<u;

  	return 0;

}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef pair<int, int> pii;

#define erep(i, x, n) for (auto i = x; i<=(ll)(n); i++)
#define rep(i, x, n) for(auto i = x; i<(ll)(n); i++)
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
#define mod(n, m) (((n%m) + m)%m)
#define reset(n, m) memset(n, m, sizeof n)
#define endl '\n'

const int mod = 998244353;

ll memo[2005][2005][2];

ll n, m, k;

ll solve(int idx, int rem, bool a)
{
	if (idx == n)
		return !rem;

	ll &ret = memo[idx][rem][2];
	if (~ret)
		return ret;
	ret = 0;
	ret = (ret + solve(idx + 1, rem, 0)) % mod;

	if (rem && idx)
	{
		if (a)
			ret = (ret + (m-1) * solve(idx + 1, rem - 1, a)) % mod;
		else
			ret = (ret + m * solve(idx + 1, rem - 1, 1)) % mod;
	}

	return ret;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	cin >> n >> m >> k;
	if (!k)
		return cout << m, 0;

	reset(memo, -1);

	cout << solve(0, k, 0);

	return 0;
}

#include <iostream>
#define MAX 2004
#define MOD 998244353
using namespace std;
long long int rez,S;
short n,m,k;
long long int Dp[MAX][MAX],x,y,z;
long long int Rezolv(short,short);
int main(){
    cin>>n>>m>>k;
    x=Rezolv(n-1,k);
    rez=m*x;
    cout<<rez<<'\n';
    return 0;
}
long long int Rezolv(short a,short b){
    if(b<0)return 0;
    if(a==0&&b==0)return 1;
    if(b>a||a==0)return 0;
    if(Dp[a][b])return Dp[a][b];
    y=Rezolv(a-1,b);//cazul in care ramane aceeasi culoare
    z=Rezolv(a-1,b-1);
    S=(y+(m-1)*z)%MOD;
    Dp[a][b]=S;
    return S;
}

//
//  main.cpp
//  181216_코포_C
//
//  Created by 박다원 on 17/12/2018.
//  Copyright © 2018 Park Dawon. All rights reserved.
//

#include <iostream>
#include <string.h>

using namespace std;

const int MOD =   998244353;

int n, m, k;

int cache[2001][2003];

int Solve(int idx, int preColor, int cnt)
{
    if(idx == n)
    {
        if(cnt == k)
        {
            return 1;
        }
        else
        {
            return 0;
        }
    }

    int& ret = cache[idx][preColor];

    if(ret != -1)
        return ret;

    ret = 0;

    for(int i = 1; i <= m; i++)
    {
        int nCnt = cnt;
        if(i != preColor && idx != 0)
            nCnt++;
        ret += Solve(idx+1, i, nCnt);
        ret %= MOD;
    }
    return ret;
}

int main(int argc, const char * argv[])
{
    cin >> n >> m >> k;

    memset(cache, -1, sizeof(cache));
    cout << Solve(0, 0, 0) << endl;

}

#include <iostream>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <random>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <ctime>
#include <climits>
#include <string>
#include <cassert>

using namespace std;

mt19937 rnd((uint64_t) new char);

int64_t rand(int64_t x, int64_t y) { return rnd() % (y - x + 1) + x; }

template<typename t>
t min(t a) {
    return a;
}

template<typename t, typename... ts>
t min(const t &a, const ts &... as) {
    t tmp = min(as...);
    return tmp < a ? tmp : a;
}

template<typename t>
t max(t a) {
    return a;
}

template<typename t, typename... ts>
t max(const t &a, const ts &... as) {
    t tmp = max(as...);
    return tmp > a ? tmp : a;
}

void prn(ostream &os) {
    os << '\n';
}

void prn() {
    cout << '\n';
}

template<typename t, typename... ts>
void prn(ostream &os, const t &a, const ts &... b) {
    os << a << ' ';
    prn(os, b...);
}

template<typename t, typename... ts>
void prn(const t &a, const ts &... b) {
    cout << a << ' ';
    prn(cout, b...);
}

#ifdef LOCAL

template<typename... ts>
void deb(const ts &... b) {
    prn(cerr, "DEBUG", b...);
}

#else
template<typename... ts>
void deb(const ts&... b){

}
#endif

#define vec_in(v) for (auto& i : v) cin >> i;
template <typename T>
void vec_out(const T &v) {
    auto end = v.end();
    --end;
    for (auto it = v.begin(); it != v.end(); it++) {
        cout << *it << " \n"[it == end];
    }
}

#define repab(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) repab(i, 0, n)
#define repab_(i, a, b) for (int i = b - 1; i >= a; i--)
#define rep_(i, n) repab_(i, 0, n)
#define infc for(;;)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using vi = vector<int>;
using vll = vector<int64_t>;
using pii = pair<int, int>;
using pll = pair<int64_t, int64_t>;
using ll = int64_t;
using ull = int64_t ;
//------------------------------------------------------------------------------

const ull mod = 998244353;

int32_t main() {
#ifdef LOCAL
#else
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
#endif
    int n, m, k;
    cin >> n >> m >> k;
    if (k == 0){
        cout << m << '\n';
        return 0;
    }
    vector<vector<ull>> prefix(n + 1, vector<ull>(k + 1));
    for (int i = 1; i <= n; i++){
        prefix[i][0] += i;
        prefix[i][0] %= mod;
        for (int j = 1; j <= k; j++){
            prefix[i][j] = prefix[i - 1][j];
            prefix[i][j] += prefix[i - 1][j - 1];
            prefix[i][j] %= mod;
        }
    }
    ull kek = m;
    for (int i = 0; i < k; i++){
        kek *= (m - 1);
        kek %= mod;
    }
    cout << ((prefix[n][k] - prefix[n - 1][k]) * kek) % mod << '\n';
}

#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
typedef long long int ll;
const ll M=998244353;

ll nCrModp(ll n, ll r)
{

    ll C[r+1];
    memset(C, 0, sizeof(C));

    C[0] = 1; // Top row of Pascal Triangle

    // One by constructs remaining rows of Pascal
    // Triangle from top to bottom
    for (ll i = 1; i <= n; i++)
    {
        // Fill entries of current row using previous
        // row values
        for (ll j = min(i, r); j > 0; j--)

            // nCj = (n-1)Cj + (n-1)C(j-1);
            C[j] = (C[j] + C[j-1]);
    }
    return C[r];
}

int main(){
	fast;
	ll n,m,k;
	cin>>n>>m>>k;
	ll ans=nCrModp(n-1,k)%M;
	ans*=pow(m-1,k)*m;
	cout<<ans;
	return 0;
}

//Mir_123
#include<bits/stdc++.h>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<iterator>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define ub upper_bound
#define lb lower_bound
#define bin binary_search
#define vmin *min_element
#define vmax *max_element
#define mod 998244353
//Use set if your want your array to be auto sorted
//sort takes log(N) time
int main(void)
{
	ll n,m,k;
	cin>>n>>m>>k;
	vector<vector<ll> >dp(n,vector<ll>(k+1,0));
	dp[0][0]=m;
	for(ll i=1;i<n;i++)
	{
		for(ll j=0;j<k+1;j++)
		{
			dp[i][j]=dp[i-1][j];
			if(j==0)
				continue;
			dp[i][j]+=(dp[i-1][j-1]*(m-1));
		}
	}
	cout<<dp[n-1][k];
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define inf 1e9
#define mod 998244353
#define MX 100005

bool cnt1[MX];
int cnt[MX], arr[MX];
map <int, int> mp;

int main()
{
	int n, m, k;
	cin>>n>>m>>k;

	ll ans = 1;
	for(int i = 1; i <= k; i++) {
		ans = ((ans % mod) * ((n-i) % mod)) % mod;
	}

	ans = (ans * m) % mod;

	cout<<ans<<endl;
}

/*
@author: sharrad99
*/
#include<bits/stdc++.h>
using namespace std;
const int mod = 998244353;
// int dp[2002][2002];
int main(){

	#ifndef ONLINE_JUDGE
	freopen("C:\\Users\\sharr\\Documents\\Input.txt", "r", stdin);
	freopen("C:\\Users\\sharr\\Documents\\Output.txt", "w", stdout);
	#endif

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	int n, m, k;
	cin >> n >> m >> k;

	vector<vector<int>> dp((n + 1), vector<int>((k + 1), 0));
	dp[1][0] = m;
	for(int i = 1; i <= n; i++) {
		for(int j = 0; j <= k; j++) {
			dp[i][j] += dp[i - 1][j];
			dp[i][j] %= mod;
			if(j == 0) continue;
			dp[i][j] += (dp[i - 1][j - 1] * (m - 1));
			dp[i][j] %= mod;
		}
	}

	cout << dp[n][k] << '\n';
}

#include <bits/stdc++.h>
#include <iomanip>
using namespace std;

template<typename T>
void
_dbg(char const* s, const T& t)
{
    cout << s << "=" << t << endl;
}
template<typename T, typename... TA>
void
_dbg(char const* s, const T& t, const TA&... ta)
{
    while (*s != ',')
        cout << *s++;
    cout << "=" << t << ",";
    _dbg(s + 1, ta...);
}
template<typename T1, typename T2>
ostream&
operator<<(ostream& os, const pair<T1, T2>& p)
{
    return os << "{" << p.first << "," << p.second << "}";
}
template<typename T>
ostream&
operator<<(ostream& os, const vector<T>& v)
{
    os << "{";
    for (auto it = v.begin(); it != v.end(); ++it)
        {
            if (it != v.begin())
                os << ",";
            os << *it;
        }
    return os << "}";
}
template<typename T1, typename T2>
ostream&
operator<<(ostream& os, const map<T1, T2>& mp)
{
    os << "{";
    for (auto it = mp.begin(); it != mp.end(); ++it)
        {
            if (it != mp.begin())
                os << ",";
            os << *it;
        }
    return os << "}";
}
template<typename T>
ostream&
operator<<(ostream& os, const set<T>& s)
{
    os << "{";
    for (auto it = s.begin(); it != s.end(); ++it)
        {
            if (it != s.begin())
                os << ",";
            os << *it;
        }
    return os << "}";
}
template<typename T>
ostream&
operator<<(ostream& os, const multiset<T>& s)
{
    os << "{";
    for (auto it = s.begin(); it != s.end(); ++it)
        {
            if (it != s.begin())
                os << ",";
            os << *it;
        }
    return os << "}";
}
template<size_t N>
ostream&
operator<<(ostream& os, const bitset<N>& bs)
{
    os << "{";
    for (size_t i = 0; i < N; ++i)
        {
            cout << bs[i];
        }
    return os << "}";
}

#ifdef LOCAL
#define dbg(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define dbg(...)
#endif
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define reunique(x) (x).resize(std::unique(all(x)) - (x).begin())
#define forn(x, y) for (ll x = 0; x < (ll)(y); ++x)

using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pss = pair<string, string>;
using pll = pair<ll, ll>;
using pdd = pair<ld, ld>;

using namespace std;

int
gcd(int a, int b)
{
    while (b)
        {
            a %= b;
            swap(a, b);
        }
    return a;
}

ll
fac(ll x)
{
    ll ans = 1;
    for (int i = 1; i <= x; ++i)
        ans *= i;
    return ans;
}

void
solve()
{
    ll C = 998244353;
    int n, m, k;
    cin >> n >> m >> k;

    auto fac = [=](ll x) {
        ll ans = 1;
        for (int i = 1; i <= x; ++i)
        {
            ans *= i;
            ans %= C;
        }
        return ans;
    };
    ll soch = fac(n-1)/(fac(n-1-k)*fac(k)%C);
    cout << "soch" << soch <<endl;
    ll ans = m;
    for(int i = 2; i <= k+1; ++i)
    {
        ans *= m-1;
        ans %= C;
    }
    cout << ans*soch;

}

int
main()
{
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    //    //freopen("output.txt", "w", stdout);
    int n;
    cin >> n;
    for (int i = 1; i <= n; ++i)
        {
            cout << "test " << i << endl;
            solve();
            cout << endl;
        }
#else
    solve();
#endif
    return 0;
}

#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<list>
#include<cmath>
#include<algorithm>
using namespace std;

#define fr(i, n) for(int i = 0; i < n; i++)
#define fre(i, n) for(int i = 0; i <= n; i++)
#define frs(i, st, n) for(int i = st; i < n; i++)
#define frse(i, st, n) for(int i = st; i <= n; i++)

typedef long long int ll;
typedef unsigned long long int ull;

const int LIM = 998'244'353;

int cnk(int n, int k, vector<vector<int>> &d)
{
	if (n == 1 || k == n)
		return 1;
	if (k == 1)
		return n;
	if (d[n][k] != -1)
		return d[n][k];
	d[n][k] = (cnk(n - 1, k, d) + cnk(n - 1, k - 1, d)) % LIM;
	return d[n][k];
}

int fact(int n, vector<int>& p)
{
	if (n == 1)
		return 1;
	if (p[n] == -1)
		p[n] = (n * fact(n - 1, p)) % LIM;
	return p[n];
}

int pow(int n, int p)
{
	if (n == 1 || p == 0)
		return 1;
	if (p == 1)
		return n;
	int tmp = pow(n, p / 2);
	return ((p % 2 == 0 ? 1 : n) * (tmp * tmp) % LIM) % LIM;
}

int main()
{
	int n, m, k;
	cin >> n >> m >> k;
	if (k == 0)
		cout << m;
	else if (m < 2)
		cout << 0;
	else
	{
		vector<vector<int>> d(n + 1, vector<int>(n + 1, -1));
		vector<int> p(n + 1, -1);
		int cnt = m * pow(m - 1, k);
		cout << (cnk(n - 1, k, d) * cnt) % LIM;
	}
	return 0;
}

#include <cstdio>
#include <queue>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <stack>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
#define MOD 998244353
long long dp[2055][2055][2];
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if(k==0)
    {
        printf("%d\n",m);
        return 0;
    }
    dp[1][0][0] = dp[1][0][1]=m;
    dp[0][0][0] = dp[0][0][1] = 0;
    for(int i = 2;i<=n;i++)
    {
        for(int j = 1;j<=i;j++)
        {
        dp[i][j][0] = (dp[i-1][j][0]+dp[i-1][j][1])%MOD;
        dp[i][j][1] = (dp[i-1][j-1][0]+dp[i-1][j-1][1])%MOD;
        }
    }
    printf("%lld\n",(dp[n][k][1]+dp[n][k][0])%MOD);
    return 0;
}

#include <iostream>
using namespace std;

long dp[2005][2005];
long A = 998244353;
long f(int n,int m,int k){
	if(n==0)
		return k==0?1:0;
	if(k<0)return 0;
	if(dp[n][k]!=-1)return dp[n][k];
	return dp[n][k] = (((m-1)*f(n-1,m,k-1))%A + f(n-1,m,k)%A)%A;
	}
int main(){
	int n,c,k;
	cin>>n>>c>>k;
	for(int i=0;i<(int)(sizeof(dp)/sizeof(dp[0]));i++)
		for(int j=0;j<(int)(sizeof(dp[i])/sizeof(dp[i][0]));j++)
			dp[i][j] = -1;
	cout<< c*f(n-1,c,k);
}

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;

typedef long long ll;
ll dp[2018][2018];
const long long MOD = 998244353LL;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, m, k;
    cin >> n >> m >> k;

    dp[0][k] = m;
    for (int j = 0; j < k; j++) dp[0][j] = 0;
    for (int i = 0; i < n; i++) dp[i][k] = m;

    for (int i = 1; i < n; i++)
    {
        for (int j = 0; j < k; j++)
        {
            dp[i][j] = max((dp[i - 1][j + 1] * (m - 1)) % MOD, dp[i - 1][j]);
        }
    }

    if (k == 0)
    {
        cout << m << endl;
        return 0;
    }

    ll ans = 0LL;
    for (int i = 0; i < n; i++) ans = (ans + dp[i][0]) % MOD;
    cout << ans << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define pii pair<int,int>
#define ll long long
#define pll pair<ll,ll>
#define vi vector<int>
#define vii vector<pii>
#define vll vector<ll>
#define MOD 998244353
#define EPS 1e-7
#define mem(x,y) memset(x,y,sizeof x)
#define INF 1e9
#define ff(i,a,b) for(int i=(a);i<=(b);i++)
#define fb(i,a,b) for(int i=(a);i>=(b);i--)
#define dist2D(x1,y1,x2,y2) ((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
#define dist3D(x1,y1,z1,x2,y2,z2) ((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2))
#define sortv(v) sort(v.begin(),v.end())

class compare{
public:
    bool operator()(pii x,pii y){
        if(x.second==y.second){
            return x.first<y.first;
        }
        return x.second<y.second;
    }
};

ostream& operator<<(ostream &os,const pll &a){
    os<<a.first<<" "<<a.second;
}

pll operator+(const pll &a, const ll &b){ return { a.first+b,a.second+b };}
pll operator*(const pll &a,const ll &b){ return {a.first*b,a.second*b};}
pll operator+(const pll &a,const pll &b){ return {a.first+b.first,a.second+b.second};}
pll operator-(const pll &a,const pll &b){ return { a.first-b.first,a.second-b.second};}
pll operator*(const pll &a,const pll &b){ return {a.first*b.first,a.second*b.second};}
pll operator%(const pll &a,const pll &b){ return {a.first%b.first,a.second%b.second};}

int Set(int N,int pos) { return N=N|(1<<pos); }
int reset(int N,int pos){ return N=N&~(1<<pos);}
bool check(int N,int pos){  return (bool) (N&(1<<pos));}

ll bigmod(ll a,ll b){
    if(b==0) return a;
    ll x=bigmod(a,b/2);
    x=(x*x)%MOD;
    if(b&1) x=(a*x)%MOD;
    return x;
}

int main()
{
        ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

        int n,m,k; cin>>n>>m>>k;

        if(k==0){
            cout<<m<<endl;
            return 0;
        }

        if(m==1){
            cout<<0<<endl;
            return 0;
        }
        if(n==1){
            cout<<m<<endl;
            return 0;
        }

        ll ans=0;

        ans=bigmod(m-1,k);
    ans=(ans*m)%MOD;
    ans=(ans*(n-k))%MOD;
        cout<<ans<<endl;

        return 0;
}

#include <bits/stdc++.h>
#define pb push_back
#define sz() size()
#define all(x) x.begin(), x.end()
#define	ff first
#define ss second
#define INF 1000000009
#define LLINF 1000000000000000009
#define mid(x,y) (x+y)>>1
typedef long long ll;
typedef long double ld;
const int  maxN = 1e5+9;
using namespace std;
ll Mod  = 998244353;
int n, m , k;
ll ans = 0;

int main(){
	//freopen("input.in", "r", stdin);
	//freopen ("output.out", "w", stdout);
	cin >> n >> m >> k;
	ll kfac = 1;
	ll comb = 1;
	n--;
	for (int i=1; i<=k; i++) kfac*=i, kfac%=Mod;
	for (int j = (n-k)+1; j<=n; j++) comb*=j, comb%=Mod;
	ll ans  = 1;
//	cout<<comb<<endl;
	for (int i=1; i<=k; i++) ans*=(m-1);
	cout<<(ans%Mod*comb*m)<<endl;
	return 0;
}

#include <bits/stdc++.h>
#define SPEED ios::sync_with_stdio(false); cin.tie(0)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define inti long long
#define pii pair<int,int>
#define pll pair<long long int,long long int>
#define FF first
#define SS second
#define mp make_pair
#define pb push_back
const int  MOD =998244353 ;
#define INF 1e18
#define eps 0.00001
#define stp setprecision(20)
#define endl '\n'
using namespace std;
inti modFact(int n)
{
    if (n >= MOD)
        return 0;

    inti result = 1;
    for (int i = 1; i <= n; i++)
        result = (result * i) % MOD;

    return result;
}
   inti modulo (int a ,unsigned long long b, int n)
 {  long long x=1 ,y=a;
 while (b>0){
 	if(b%2==1)  x=(x*y)%n ;
 	y=(y*y)%n ;
 	b/=2;
} return(x%n) ;
 }
    long long inversemod(long int n)
{
    return modulo(n,MOD-2,MOD);
}

  inti nr(int n,int r)
    {
	      inti ans=1;
	      if(r>n)return 0;
	    if(n<=0||r<0)ans=0;
	    else if(r==0)ans=1;
	    else
	       {      for(int i=r;i>=1;i--){
	      	 ans= (  ans* (( ((n-r+i)%MOD)*(inversemod(i)))%MOD ))%MOD;
		  }
		   }
		  return ans;

	}

int main()
{    SPEED;

       inti n,m,k;
        cin>>n>>m>>k;

          inti resu= ((( nr(n-1,k))%MOD )*(((modulo(m-1,k,MOD))*m)%MOD))%MOD;
         cout<<resu%MOD;
}

//													\[T]/ Praise
//													 (*)  The
//													 / \  Sun

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double dbl;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef vector<long long> vl;
typedef vector< pair<int, int> > vii;
#define mp make_pair
#define pb push_back
#define prinvec(a, n) for(ll i = 0; i < n; i++) cout << a[i] << " "; cout << "\n";
#define invec(a, n) for(ll i = 0; i < n; i++) {cin >> a[i];}
#define rep(n) for(ll i = 0; i < n; i++)
#define fr(i,j,k) for(ll i = j; i < k; i++)
#define FR(i,j,k) for(ll i = j; i >= 0; i--)
#define MOD 998244353
#define all(v) v.begin(), v.end()
#define INF 1000000
#define xx first
#define yy second

void fast()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
}

int dp[2005][2005];
int power(int a , int x)
{
	int res = 1;

	while(x > 0)
	{
		if(x & 1)
		{
			res = res * a;
			res = res % MOD;
		}
		a = a * a;
		x = x << 1;
	}

	return res % MOD;
}

int fun1(int x, int n)
{
	return (x * power(x-1, n-1)) % MOD;
}

int fun2(int n, int r)
{
	fr(i,0,n+1)
		dp[i][0] = 1;
	fr(i,0,r+1)
		dp[0][i] = 1;
	dp[0][0] = 0;

	fr(i,1,n+1)
		fr(j,1,i+1)
			dp[i][j] = (dp[i-1][j] + dp[i-1][j-1]) % MOD;

	return dp[n][r];
}

int main()
{

	#ifndef ONLINE_JUDGE
	freopen("/home/ram/Competitive Programming/IO/in.txt", "r", stdin);
	freopen("/home/ram/Competitive Programming/IO/out.txt", "w", stdout);
	#endif

	int n, m, k;
	cin >> n >> m >> k;

	int cols = fun1(m, k+1);
	int segs = fun2(n - k, k);

	// cout << fun2(7, 3);
	// cout << cols << "\n";
	// cout << segs;
	cout << (cols * segs) % MOD;
}

#include <bits/stdc++.h>
#define int long long
using namespace std;

const int N = 2e3 + 7, MOD = 998244353;

int dp[N][N], P[N];

int f(int idx, int k) {
    if(!idx) return k == 0;
    if(~dp[idx][k]) return dp[idx][k];
    int ret = 0;
    if(k > 0) ret = (f(idx - 1, k - 1) + f(idx - 1, k)) % MOD;
    else      ret = f(idx - 1, k);
    return dp[idx][k] = ret;

}

int32_t main() {

    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    memset(dp, -1, sizeof dp);
    int n, m, k; cin >> n >> m >> k;

    P[0] = 1;
    for(int i = 1; i <= n; i++) {
        P[i] = (P[i - 1] * (m - 1)) % MOD;
    }
    if(k == 0) {
        cout << m << endl;
        return 0;
    }
    int ans = 0;
    for(int i = 1; i <= n - k; i++) {
        ans = (ans + ((m * f(n - i, k)) % MOD * P[k]) % MOD) % MOD;
    }
    cout << ans << endl;

}

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
#include <limits>
#include <queue>
typedef std::numeric_limits< double > dbl;
using namespace std;
#define mod 998244353
#define MAX 100000
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)

int fact[2005];
int c[2005]={0};

int ncr(int n, int r, int m)
{
    for(int i=1;i<=2000;i++){c[i]=0;}
    c[0] = 1;

    for (int i = 1; i <= n; i++)
    {
        for (int j = min(i, r); j > 0; j--)

            c[j] = ( c[j] + c[j-1])%m;
    }
    return c[r];
}

int main(){
  int n,m,k,ans;
  cin>>n>>m>>k;
  fact[0]=1;
  for(int i=1;i<=2000;i++)
    fact[i]=(fact[i-1]*i)% mod;

  //cout<<( ncr(4,1,mod) )<<endl;
  ans= ( ncr(n-1,k,mod) * ncr(m,k+1,mod) )% mod;
  //cout<<ans<<endl;
  ans = ( ans * fact[k+1] )% mod;
  cout<<ans<<endl;

}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef pair<int, int> pii;

#define erep(i, x, n) for (auto i = x; i<=(ll)(n); i++)
#define rep(i, x, n) for(auto i = x; i<(ll)(n); i++)
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
#define mod(n, m) (((n%m) + m)%m)
#define reset(n, m) memset(n, m, sizeof n)
#define endl '\n'

const ll mod = 998244353;

ll memo[2005][2005];
ll val;
ll n, m, k;

ll solve(int idx, int rem)
{
	if (idx == n)
	{
		if (!rem)
			return m;
		return 0;
	}

	ll &ret = memo[idx][rem];
	if (~ret)
		return ret;
	ret = 0;
	ret = (ret + solve(idx + 1, rem)) % mod;

	if (rem && idx)
		ret = (ret + solve(idx + 1, rem - 1)) % mod;

	return ret;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	cin >> n >> m >> k;

	reset(memo, -1);
	cout << solve(0, k) << endl;

	return 0;
}

#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define mod 998244353
#define max 201
ll n, m, k;
ll dp[max][max];
// class id{
// public:
// 	ll i;
// 	ll diff;
// 	ll prev;
// 	id(ll i, ll diff, ll prev){
// 		this->i=i;
// 		this->diff=diff;
// 		this->prev=prev;
// 	}
// };
// unordered_map<id,ll> dp;

ll ways(ll i, ll diff, ll prev){
	//base case
	if(i == n){
		return diff==0;
	}
	//recursive case
	//id hre(i, diff, prev);
	if(dp[i][diff]!=-1){return dp[i][diff];}
	ll ans= (i!=0)? ways(i+1, diff, prev): 0;
	for(int j=1; j<=m; j++){
		if(j!=prev && diff>0|| (i==0)){
			ans += ways(i+1,(i!=0)?diff-1:diff, j);
			ans %= mod;
		}
	}
	return dp[i][diff] = ans;
}

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
	#endif
	memset(dp, -1, sizeof(dp));
	cin>>n>>m>>k;
	cout<<ways(0, k, 0);
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>
using namespace std;
int mod= 998244353;

int main(){
	int n,m,k;
	cin>>n>>m>>k;

	long long ans=m;
	long long shang=1;
	for(int i=0,mul=n-1;i<k;mul--,i++){
		shang*=mul;
		shang%=mod;
	}
	long long xia=1;
	for(int i=0,mul=k;i<k-1;mul--,i++){
		xia*=mul;
		xia%=mod;
	}

	ans*=shang;
	ans%=mod;
	ans/=xia;

	shang=1;
	for(int i=0;i<k;i++){
		shang*=(m-1);
		shang%=mod;
	}
	ans*=shang;
	cout<<ans%mod;

	return 0;
}

#include <bits/stdc++.h>

const int MOD = 998244353, N = 2010;
int n, m, k, factorial[N];

int power(int base, int exp) {
  int ans = 1;
  while (exp) {
    if (exp&1)
      ans = (1LL*ans*base)%MOD;
    base = (1LL*base*base)%MOD;
    exp>>=1;
  }
  return ans;
}

int inv(int a) {
  a %= MOD;
  if (a < 0) a+= MOD;
  int b = MOD, u = 0, v = 1;
  while(a) {
    int t = b/a;
    b -= t*a; std::swap(a, b);
    u -= t*v; std::swap(u, v);
  }
  if (u < 0) u += MOD;
  return u;
}

int main() {
  scanf("%d%d%d", &n, &m, &k);

  factorial[0] = 1;
  for (int i = 1; i < N; i++)
    factorial[i] = (1LL*factorial[i-1]*i)%MOD;

  //printf("%lld\n", (1LL*factorial[n-2+k]*inv(factorial[k])*m*power(m-1, k))%MOD);
  printf("%lld\n", (1LL*(factorial[n-2+k]/inv(factorial[k]))*m*power(m-1, k))%MOD);
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define MOD 998244353
#define ll long long

ll power(ll a, ll b) {
    if(b==0)
        return 1;
    if(b%2==0)
        return power((a*a)%MOD,b/2)%MOD;
    else
        return (a*power((a*a)%MOD,(b-1)/2)%MOD)%MOD;
}

int main() {
    ll n,m,k;
    cin>>n>>m>>k;

    vector<ll> fac(n+1),rfac(n+1);
    fac[0]=1;

    for(int i=1; i<=n; ++i)
        fac[i] = (fac[i-1] * i)%MOD;
    rfac[n] = power(fac[n],MOD-2);
    for(int i=n; i>=1; --i)
        rfac[i-1] = (rfac[i]*i)%MOD;

    ll ans = m;
    ans = (ans * power(m-1,k))%MOD;
    ans = (ans * fac[n])%MOD;
    ans = (ans * power(fac[k],MOD-2))%MOD;
    ans = (ans * power(fac[n-1-k],MOD-2))%MOD;
    cout<<ans;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

const int mod = 998244353;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m, k;
  cin >> n >> m >> k;
  int dp[n + 1][k + 2];
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= k + 1; ++j) {
      dp[i][j] = 0;
    }
  }
  dp[1][1] = m;
  for (int i = 2; i <= n; ++i) {
    for (int j = 1; j <= k + 1; ++j) {
      dp[i][j] = dp[i - 1][j] + (dp[i - 1][j - 1] * (m - 1)) % mod;
      dp[i][j] %= mod;
    }
  }
  cout << dp[n][k + 1] << '\n';
  return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define x first
#define y second
#define pii pair <int, int>
const int MOD = 998244353;

int dp[2001][2001];

int main()
{
    for (int i = 0; i < 2001; i++)
        for (int j = 0; j < 2001; j++)
            dp[i][j] = 0;

    int n,m,k;
    cin >> n >> m >> k;

    dp[1][1] = 1;
    dp[1][0] = m;

    for (int i = 2; i <= n; i++)
    {
        for (int j = 0; j <= k; j++)
        {
            if (j > i)
                continue;

            dp[i][j] = (dp[i][j] + dp[i-1][j]) % MOD;
            if (j > 0)
                dp[i][j] = (1ll*dp[i][j]*m) % MOD;
        }
    }

    cout << dp[n][k];

    return 0;
}

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int n,m,k,f[2001][2001];//前 i 个砖块，有 j 个砖块和它左边的砖块颜色一样
const int mod=998244353;
int main()
{
	cin>>n>>m>>k;
	for(int i=1;i<=n;i++)
	{
		f[i][0]=m;
		for(int j=1;j<=min(i-1,k);j++)
			f[i][j]=(f[i-1][j]+f[i-1][j-1]*(m-1))%mod;
	}
	cout<<f[n][k];
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll mod = (ll)998244353;
const int N = 2005;
int n, m, k;
ll dp[N][N];

ll solve(int cur, int sisa) {
	if (cur == n) {
		if (sisa == 0) return 1LL;
		else return 0LL;
	}
	ll &ret = dp[cur][sisa];
	if (ret != - 1) return ret;

	ret = 0;
	// ret += solve(cur+1, sisa);
	// if (sisa > 0) ret += solve(cur+1, sisa-1);

	ret = (ret + solve(cur+1, sisa)) %mod;
	if (sisa > 0) ret = (ret + solve(cur+1, sisa-1)) %mod;

	return ret;
}

ll fe(ll x, ll y) {
	if (y == 0LL) return 1LL;
	else if (y == 1LL) return x;
	ll ret = fe(x, y/2LL);
	ret = (ret*ret) %mod;
	if (y&1LL) ret = (ret*x) %mod;
	return ret;
}

ll npr(ll x, ll y) {
	ll ret = 1LL;
	for (ll i = x; i > 1; i--)
		ret = (ret*i) %mod;
	for (ll i = 2LL; i <= x-y; i++)
		ret = (ret * fe(i, mod-2LL)) %mod;
	return ret;
}

int main() {
	scanf("%d %d %d", &n, &m, &k);
	memset(dp, -1, sizeof dp);
	ll x = solve(1, k);
	// printf(">> x=%lld\n", x);
	ll ans = (npr((ll)m, (ll)k+1LL) * x) %mod;

	printf("%I64d\n", ans);

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000009
#define pb push_back
#define endl '\n'
double pie=acos(-1);
#define tez_chal ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
const ll maxN=1e5;
ll dp[2002][2002];
ll n,m,k;
ll funt(ll i,ll j){
	    if(i>=n || j>=n || j<0 || i<0 ) return 0;
	    if(dp[i][j]!=-1) return dp[i][j];
	    return dp[i][j]=funt(i-1,j-1)*(m-1)+funt(i-1,j);
}
int solve()
{

	cin>>n>>m>>k;
	ll mode=998244353;
	ll dp[n+1][k+1];
	memset(dp,0,sizeof(dp));
	for(ll i=0;i<=n;i++){
		for(ll j=0;j<=k;j++){
			if(j==0){
				dp[i][j]=m%mode;
			}
			else if(i<=j) dp[i][j]=0LL;
			else{
				dp[i][j]=dp[i-1][j]%mode;
				dp[i][j]+=dp[i-1][j-1]*(m-1LL)%mode;
			}
		}
	}
	cout<<dp[n][k]<<endl;
	return 0;
}

int main()
{
    tez_chal;     ll t=1;  //cin>>t;

    while(t--) solve();

    // ll testcase=1;
    // while(t--){
    // 	cout<<"Case #"<<testcase++<<": ";
    // 	solve();
    // }

    return 0;
}

#include <bits/stdc++.h>

#define ll long long
#define endl '\n'
using namespace std;
typedef bitset<20> MASK;
const int mod=998244353;
int x,y,z;
ll memo[2005][2005];
ll solve(int idx,int left){
    if(idx==x-1 && left==0)
        return 1;
    if(left<0 || idx==x-1)
        return 0;
    ll &cur=memo[idx][left];
    if(~cur)
        return cur;
    cur=0;
    cur+=(solve(idx+1,left-1)%mod)+(solve(idx+1,left)%(mod));
    return (cur*(y/2))%mod;
}
int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    memset(memo,-1,sizeof(memo));
    cin>>x>>y>>z;
    cout<<(solve(0,z)*y)%mod;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> ii;

const int MN = 2010;
const ll mod = 998244353;
const double EPS = 1e-9;

ll c[MN][MN];

ll pot(ll b, ll e){
    if (e == 0) return 1;
    ll tmp = pot(b,e/2);
    tmp *= tmp;
    if ((e & 1)){
        return (tmp)%mod;
    }
    return (tmp*b)%mod;
}

int main()
{
#ifdef acm
    freopen("a.in","r",stdin);
#else
    cin.tie(0);
    ios_base::sync_with_stdio(0);
#endif // acm

    for (int i=0; i < MN; i++){
        c[i][0] = c[i][i] = 1;
        for (int j=1; j < i; j++){
            c[i][j] = c[i-1][j-1] + c[i-1][j];
            c[i][j] %= mod;
        }
    }

    ll n, m, k;
    cin >> n >> m >> k;

    ll ans = m*(c[n-1][k]);
    ans %= mod;

    ans *= pot(m-1,k);

    cout << ans%mod << "\n";

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
using llong = long long;

llong mod = 998244353;

llong C(llong n, llong k)
{
    llong B[n+1][n+1]; // Создаем массив B из n+1 строки
    for(llong i=0;i<=n;++i) // Заполняем i-ю строку массива
    {
        B[i][0]=1; // На концах строки стоят единицы
        B[i][i]=1;
        for(llong j=1;j<i;++j)
        { // Заполняем оставшиеся элементы i-й строки
            B[i][j]=B[i-1][j-1]+B[i-1][j];
        }
    }
    return B[n][k];
}

llong n, m, k;

llong mult()
{
    llong res = 0;
    if (k == 0)
        return res;
    res = 1;
    for (auto i = 0; i < k; i++)
    {
        res *= (m - 1);
        res %= mod;
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    cout.tie(0);
    cin.tie(0);

    cin >> n >> m >> k;

    long long r1 = 1;

    for(int i = 0; i < k; ++i)
    {
        r1 = (r1 * (m-1)) % mod;
    }
    r1 = (m * C(n-1,k) * r1)%mod;
    cout << r1;

    return 0;
}

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    long long ans,n,m,k;

    cin >> n >> m >> k;

    if(k == 0){
        cout << m;
        return 0;
    }

    ans = m;
    for(int i = 1; i <= k; i++){
        ans = ans*(m-1)%998244353;
    }

    if(n > 2){cout << ans*2;}
    else{cout << ans;}
    return 0;
}