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;
template <typename T>
inline T read() {
  T f = 0, x = 0;
  char c = getchar();
  while (!isdigit(c)) f = c == '-', c = getchar();
  while (isdigit(c)) x = x * 10 + c - 48, c = getchar();
  return f ? -x : x;
}
namespace run {
const int N = 1e7 + 9, mod = 998244353;
inline int add(int x, int y) { return x + y >= mod ? x - mod + y : x + y; }
inline int sub(int x, int y) { return x >= y ? x - y : x + mod - y; }
inline int qpow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = 1LL * x * ret % mod;
    x = 1LL * x * x % mod, y >>= 1;
  }
  return ret;
}
int n, m, K, idk[N], prime[N], S[N], cnt, p, inv[N];
bool is[N];
inline void pre() {
  idk[1] = 1;
  for (int i = 2; i <= K; i++) {
    if (!is[i]) prime[++cnt] = i, idk[i] = qpow(i, K);
    for (int j = 1; j <= cnt && i * prime[j] <= K; j++) {
      is[i * prime[j]] = 1,
             idk[i * prime[j]] = 1LL * idk[i] * idk[prime[j]] % mod;
      if (!(i % prime[j])) break;
    }
  }
  S[K] = 1;
  int base = sub(0, p), pw = 1, comb = 1;
  for (int i = K - 1; ~i; i--) {
    pw = 1LL * pw * base % mod;
    comb = 1LL * comb * inv[K - i] % mod * (n - i - 1) % mod;
    S[i] = (1LL * (base + 1) * S[i + 1] + 1LL * pw * comb) % mod;
  }
}
int main() {
  n = read<int>(), m = read<int>(), K = read<int>();
  p = qpow(m, mod - 2);
  inv[0] = inv[1] = 1;
  for (int i = 2; i <= K; i++)
    inv[i] = 1LL * inv[mod % i] * (mod - mod / i) % mod;
  pre();
  if (m == 1) printf("%d\n", qpow(n, K)), exit(0);
  if (n <= K) {
    int ans = 0, comb = 1, pw = 1, pinv = qpow(sub(1, p), mod - 2),
        ipw = qpow(sub(1, p), n);
    for (int i = 0; i <= n; i++) {
      ans = (1LL * comb * pw % mod * ipw % mod * idk[i] + ans) % mod;
      comb = 1LL * comb * (n - i) % mod * inv[i + 1] % mod;
      pw = 1LL * pw * p % mod, ipw = 1LL * ipw * pinv % mod;
    }
    printf("%d\n", ans), exit(0);
  }
  int comb = 1, pw = 1, ans = 0;
  for (int i = 1; i <= K; i++) {
    comb = 1LL * comb * (n - i + 1) % mod * inv[i] % mod,
    pw = 1LL * pw * p % mod;
    ans = (1LL * pw * idk[i] % mod * comb % mod * S[i] + ans) % mod;
  }
  printf("%d\n", ans);
  return 0;
}
}  // namespace run
int main() { return run::main(); }