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 Mod = 998244353;
int fpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1ll * res * x % Mod;
    x = 1ll * x * x % Mod, y >>= 1;
  }
  return res;
}
const int MAX_N = 1e7 + 5;
int fac[MAX_N], ifc[MAX_N];
int N, M, K;
bool nprime[MAX_N];
int ik[MAX_N], prime[MAX_N], num;
void sieve() {
  ik[1] = 1;
  for (int i = 2; i <= K; i++) {
    if (!nprime[i]) prime[++num] = i, ik[i] = fpow(i, K);
    for (int j = 1; j <= num && i * prime[j] <= K; j++) {
      nprime[i * prime[j]] = 1,
                 ik[i * prime[j]] = 1ll * ik[i] * ik[prime[j]] % Mod;
      if (i % prime[j] == 0) break;
    }
  }
}
int P, S[MAX_N], pw[MAX_N];
void prepare() {
  S[K] = 1;
  int binom = 1;
  for (int i = K - 1; ~i; i--) {
    binom = 1ll * (N - i - 1) * binom % Mod;
    S[i] = ((1ll + P) * S[i + 1] + 1ll * pw[K - i] * binom % Mod * ifc[K - i]) %
           Mod;
  }
}
int C(int n, int m) {
  if (n < m || n < 0 || m < 0)
    return 0;
  else
    return 1ll * fac[n] * ifc[m] % Mod * ifc[n - m] % Mod;
}
int main() {
  cin >> N >> M >> K;
  if (M == 1) return printf("%d\n", fpow(N, K)) & 0;
  P = Mod - fpow(M, Mod - 2);
  for (int i = pw[0] = 1; i <= K; i++) pw[i] = 1ll * pw[i - 1] * P % Mod;
  for (int i = fac[0] = 1; i <= K; i++) fac[i] = 1ll * fac[i - 1] * i % Mod;
  ifc[K] = fpow(fac[K], Mod - 2);
  for (int i = K - 1; ~i; i--) ifc[i] = 1ll * ifc[i + 1] * (i + 1) % Mod;
  sieve();
  if (N <= K) {
    int ans = 0, q = 1ll * (M - 1) * fpow(M, Mod - 2) % Mod,
        iq = fpow(q, Mod - 2);
    q = fpow(q, N);
    for (int i = 0, p = 1; i <= N;
         i++, p = 1ll * p * (Mod - P) % Mod, q = 1ll * q * iq % Mod)
      ans = (ans + 1ll * C(N, i) * q % Mod * p % Mod * ik[i]) % Mod;
    printf("%d\n", ans);
    return 0;
  }
  prepare();
  int ans = 0, binom = 1;
  for (int i = 0, p = 1; i <= K; i++, p = 1ll * (Mod - P) * p % Mod)
    ans =
        (ans + 1ll * ik[i] * p % Mod * S[i] % Mod * binom % Mod * ifc[i]) % Mod,
    binom = 1ll * binom * (N - i) % Mod;
  printf("%d\n", ans);
  return 0;
}