#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
using namespace std;

#ifdef LOCAL
	#define eprintf(...) fprintf(stderr, __VA_ARGS__);fflush(stderr);
#else
	#define eprintf(...) 42
#endif

using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
	return (ull)rng() % B;
}

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

clock_t startTime;
double getCurrentTime() {
	return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}


const ll MOD = 998244353;
ll add(ll x, ll y) {
	x += y;
	if (x >= MOD) return x - MOD;
	return x;
}
ll sub(ll x, ll y) {
	x -= y;
	if (x < 0) return x + MOD;
	return x;
}
ll mult(ll x, ll y) {
	return (x * y) % MOD;
}
ll bin_pow(ll x, ll p) {
	if (p == 0) return 1;
	if (p & 1) return mult(x, bin_pow(x, p - 1));
	return bin_pow(mult(x, x), p / 2);
}
ll rev(ll x) {
	return bin_pow(x, MOD - 2);
}


const int N = 5050;
int n, m;
int pw[N][N];

int main()
{
	startTime = clock();
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);

	for (int x = 0; x < N; x++) {
		pw[x][0] = 1;
		for (int i = 1; i < N; i++)
			pw[x][i] = mult(pw[x][i - 1], x);
	}
	scanf("%d%d", &n, &m);
	int ans = 0;
	for (int i = 0; i < n; i++)
		for (int x = 1; x <= m; x++) {
			ans = add(ans, mult(pw[m - x][i], pw[m][n - 1 - i]));
		}
	for (int d = 1; d < n; d++)
		for (int x = 1; x <= m; x++) {
			ans = add(ans, mult(mult(n - d, x - 1), mult(pw[m - x][d - 1], pw[m][n - 1 - d])));
		}
	printf("%d\n", ans);

	return 0;
}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

using LL = long long;
using LD = long double;
using ordered_set = tree<LL,null_type,less<LL>,rb_tree_tag,tree_order_statistics_node_update>;

void fastio() {
	cin.tie(nullptr);
	cin.sync_with_stdio(false);
}

const LL MOD = 998244353;
const LL INF = 1e18;
const LL N = 2e5+10;

#define S second
#define F first
#define vt vector

vt<LL> fac(N), ifac(N);

LL bpow(LL x, LL p, LL m) {
	x %= m;
	LL r = 1;
	while (p) {
		if (p&1) {
			r = r*x%m;
		}
		p>>=1;
		x = x*x %m;
	}
	return r;
}

LL binom (LL n, LL r, LL m) {
	if (r > n) {
		return 0;
	}
	LL res = fac[n]*ifac[r]%m * ifac[n-r]%m;
	return res;
}

int main() {
	fastio();

	fac[0] = 1;
	for (LL i = 1; i < N; ++i) {
		fac[i] = i*fac[i-1]%MOD;
	}
	ifac[N-1] = bpow(fac[N-1], MOD-2, MOD);

	for (LL i = N-2; i >= 0; --i) {
		ifac[i] = ifac[i+1]*(i+1)%MOD;
	}
	
	LL n, m, k;
	cin >> n >> m >> k;

	if (n == 1 || m == 1) {
		LL mx = max(n, m);
		LL ans = 0;
		for (LL i = 1; i <= k; ++i) {
			LL l = 1;
			LL r = bpow(k-i+1, mx, MOD) - bpow (k-i, mx, MOD);
			//cerr << l << " " << r << "\n";
			ans = (ans + l*r% MOD + MOD) % MOD;
		}
		cout << ans << "\n";
		return 0;

	}

	LL ans = 0;
	for (LL i = 1; i <= k; ++i) {
		LL l = bpow(i, n, MOD) - bpow (i-1, n, MOD);
		LL r = bpow(k-i+1, m, MOD);
		//cerr << l << " " << r << "\n";
		ans = (ans + l*r% MOD + MOD) % MOD;
	}
	cout << ans << "\n";

}