Problem: Consider the following experiment. You have a deck of m cards, and exactly one card is a joker. n times, you do the following: shuffle the deck, take the top card of the deck, look at it and return it into the deck.

Let x be the number of times you have taken the joker out of the deck during this experiment. Assuming that every time you shuffle the deck, all m! possible permutations of cards are equiprobable, what is the expected value of x^k? Print the answer modulo 998244353.

Input

The only line contains three integers n, m and k (1 ≤ n, m < 998244353, 1 ≤ k ≤ 5000).

Output

Print one integer — the expected value of x^k, taken modulo 998244353 (the answer can always be represented as an irreducible fraction a/b, where b mod 998244353 ≠ 0; you have to print a ⋅ b^{-1} mod 998244353).

Examples

Input


1 1 1


Output


1


Input


1 1 5000


Output


1


Input


2 2 2


Output


499122178


Input


998244352 1337 5000


Output


326459680

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 5;
const int mod = 998244353;
inline int pls(int a, int b) {
  a += b - mod;
  return a + (a >> 31 & mod);
}
inline int mns(int a, int b) {
  a -= b;
  return a + (a >> 31 & mod);
}
inline void inc(int& a, int b) {
  a += b - mod;
  a += a >> 31 & mod;
}
inline void dec(int& a, int b) {
  a -= b;
  a += a >> 31 & mod;
}
inline int fpow(int b, int k) {
  int res = 1;
  while (k) {
    if (k & 1) res = 1LL * res * b % mod;
    b = 1LL * b * b % mod;
    k >>= 1;
  }
  return res;
}
int n, m, k, f[N], prime[N], prime_tot, vis[N], fac[N], ifac[N], inv[N], p,
    pw[N], g[N];
void solve(void) {
  int res = 0, tmp, qw = 1, ivq = fpow(mod + 1 - p, mod - 2);
  for (int i = 1; i <= n; ++i) qw = 1LL * qw * (mod + 1 - p) % mod;
  for (int i = 1, _binom = 1; i <= n; ++i) {
    _binom = 1LL * (n - i + 1) * _binom % mod * inv[i] % mod;
    qw = 1LL * qw * ivq % mod;
    tmp = 1LL * _binom * qw % mod * pw[i] % mod * g[i] % mod;
    inc(res, tmp);
  }
  cout << res;
}
int main(void) {
  cin >> n >> m >> k;
  fac[0] = fac[1] = ifac[0] = ifac[1] = inv[1] = 1,
  pw[1] = p = fpow(m, mod - 2), pw[0] = 1, g[1] = 1;
  if (n == 1) return printf("%d\n", p), 0;
  for (int i = 2; i <= k; ++i) {
    if (!vis[i]) {
      prime[++prime_tot] = i, g[i] = fpow(i, k);
      for (int j = 1; j <= prime_tot; ++j) {
        if (prime[j] * i > k) break;
        vis[i * prime[j]] = 1;
        g[i * prime[j]] = 1LL * g[i] * g[prime[j]] % mod;
        if (i % prime[j] == 0) break;
      }
    }
    fac[i] = 1LL * fac[i - 1] * i % mod;
    inv[i] = 1LL * (mod - mod / i) * inv[mod % i] % mod;
    ifac[i] = 1LL * ifac[i - 1] * inv[i] % mod;
    pw[i] = 1LL * pw[i - 1] * p % mod;
  }
  if (n <= k + 1) return solve(), 0;
  f[k] = 1;
  for (int i = k - 1, _binom = 1, tmp; i; --i) {
    _binom = 1LL * _binom * inv[k - i] % mod * (n - i - 1) % mod;
    tmp = 1LL * _binom * pw[k - i] % mod;
    if ((k - i) & 1) tmp = mod - tmp;
    f[i] = pls(tmp, 1LL * f[i + 1] * (mod + 1 - p) % mod);
  }
  int res = 0;
  for (int i = 1, _binom = 1; i <= k; ++i) {
    _binom = 1LL * _binom * inv[i] % mod * (n - i + 1) % mod;
    inc(res, 1LL * _binom * f[i] % mod * g[i] % mod * pw[i] % mod);
  }
  cout << res;
  return 0;
}