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>
class Modular {
 private:
  using Type = typename decay<decltype(T::value)>::type;
  Type value;

 public:
  Modular() { value = 0; }
  template <typename U>
  Modular(const U& x) {
    value = normalize(x);
  }
  template <typename U>
  Type normalize(const U& x) {
    Type res;
    if (-mod() <= x && x < mod()) {
      res = static_cast<Type>(x);
    } else {
      res = static_cast<Type>(x % mod());
    }
    if (res < 0) {
      res += mod();
    }
    return res;
  }
  explicit operator Type() const { return value; }
  template <typename U>
  explicit operator U() const {
    return static_cast<U>(value);
  }
  constexpr static Type mod() { return T::value; }
  Modular power(Modular n, Type x) {
    assert(x >= 0);
    Modular res = 1;
    for (; x; x /= 2, n *= n)
      if (x & 1) res *= n;
    return res;
  }
  Type inverse(Type a, Type m) {
    Type x = 0, y = 1;
    while (a != 0) {
      Type q = m / a;
      m -= q * a;
      swap(a, m);
      x -= q * y;
      swap(x, y);
    }
    assert(m == 1);
    return x;
  }
  Modular& operator+=(const Modular& o) {
    if ((value += o.value) >= mod()) value -= mod();
    return *this;
  }
  template <typename U>
  Modular& operator+=(const U& o) {
    return *this += Modular(o);
  }
  Modular& operator-=(const Modular& o) {
    if ((value -= o.value) < 0) value += mod();
    return *this;
  }
  template <typename U>
  Modular& operator-=(const U& o) {
    return *this -= Modular(o);
  }
  Modular& operator*=(const Modular& o) {
    value = normalize(1ll * value * o.value);
    return *this;
  }
  template <typename U>
  Modular& operator*=(const U& o) {
    return *this *= Modular(o);
  }
  Modular& operator/=(const Modular& o) {
    return *this *= Modular(inverse(o.value, mod()));
  }
  template <typename U>
  Modular& operator/=(const U& o) {
    return *this /= Modular(o);
  }
  Modular operator+() { return Modular(+value); }
  Modular operator-() { return Modular(-value); }
  Modular& operator++() { return *this += 1; }
  Modular& operator--() { return *this -= 1; }
  friend ostream& operator<<(ostream& os, const Modular& x) {
    os << x.value;
    return os;
  }
  friend istream& operator>>(istream& is, Modular& x) {
    typename common_type<Type, int64_t>::type in;
    is >> in;
    x.value = x.normalize(in);
    return is;
  }
  friend bool operator==(const Modular& a, const Modular& b) {
    return a.value == b.value;
  }
  template <typename U>
  friend bool operator==(const Modular& a, U b) {
    return a == Modular(b);
  }
  template <typename U>
  friend bool operator==(U a, const Modular& b) {
    return Modular(a) == b;
  }
  friend bool operator!=(const Modular& a, const Modular& b) {
    return a.value != b.value;
  }
  template <typename U>
  friend bool operator!=(const Modular& a, U b) {
    return a != Modular(b);
  }
  template <typename U>
  friend bool operator!=(U a, const Modular& b) {
    return Modular(a) != b;
  }
  friend bool operator>(const Modular& a, const Modular& b) {
    return a.value > b.value;
  }
  template <typename U>
  friend bool operator>(const Modular& a, U b) {
    return a > Modular(b);
  }
  template <typename U>
  friend bool operator>(U a, const Modular& b) {
    return Modular(a) > b;
  }
  friend bool operator<(const Modular& a, const Modular& b) {
    return a.value < b.value;
  }
  template <typename U>
  friend bool operator<(const Modular& a, U b) {
    return a < Modular(b);
  }
  template <typename U>
  friend bool operator<(U a, const Modular& b) {
    return Modular(a) < b;
  }
  friend bool operator>=(const Modular& a, const Modular& b) {
    return a.value >= b.value;
  }
  template <typename U>
  friend bool operator>=(const Modular& a, U b) {
    return a >= Modular(b);
  }
  template <typename U>
  friend bool operator>=(U a, const Modular& b) {
    return Modular(a) <= b;
  }
  friend bool operator<=(const Modular& a, const Modular& b) {
    return a.value <= b.value;
  }
  template <typename U>
  friend bool operator<=(const Modular& a, U b) {
    return a <= Modular(b);
  }
  template <typename U>
  friend bool operator<=(U a, const Modular& b) {
    return Modular(a) <= b;
  }
  friend Modular operator+(const Modular& a, const Modular& b) {
    return Modular(a) += b;
  }
  template <typename U>
  friend Modular operator+(const Modular& a, const U& b) {
    return Modular(a) += Modular(b);
  }
  template <typename U>
  friend Modular operator+(const U& a, const Modular& b) {
    return Modular(a) += b;
  }
  friend Modular operator-(const Modular& a, const Modular& b) {
    return Modular(a) -= b;
  }
  template <typename U>
  friend Modular operator-(const Modular& a, const U& b) {
    return Modular(a) -= Modular(b);
  }
  template <typename U>
  friend Modular operator-(const U& a, const Modular& b) {
    return Modular(a) -= b;
  }
  friend Modular operator*(const Modular& a, const Modular& b) {
    return Modular(a) *= b;
  }
  template <typename U>
  friend Modular operator*(const Modular& a, const U& b) {
    return Modular(a) *= Modular(b);
  }
  template <typename U>
  friend Modular operator*(const U& a, const Modular& b) {
    return Modular(a) *= b;
  }
  friend Modular operator/(const Modular& a, const Modular& b) {
    return Modular(a) /= b;
  }
  template <typename U>
  friend Modular operator/(const Modular& a, const U& b) {
    return Modular(a) /= Modular(b);
  }
  template <typename U>
  friend Modular operator/(const U& a, const Modular& b) {
    return Modular(a) /= b;
  }
};
constexpr int MOD = 998244353;
using Mint = Modular<integral_constant<decay<decltype(MOD)>::type, MOD>>;
template <typename T, typename U>
T power(T n, U x) {
  assert(x >= 0);
  T res = 1;
  for (; x; x /= 2, n *= n)
    if (x & 1) res *= n;
  return res;
}
int main() {
  int N, M, K;
  cin >> N >> M >> K;
  vector<vector<Mint>> dp(K + 2, vector<Mint>(K + 2));
  dp[0][0] = 1;
  for (int tuple = 0; tuple <= K; tuple++) {
    for (int distinct = 0; distinct <= tuple; distinct++) {
      dp[tuple + 1][distinct] += distinct * dp[tuple][distinct];
      dp[tuple + 1][distinct + 1] += (N - distinct) * dp[tuple][distinct];
    }
  }
  Mint ans = 0;
  for (int distinct = 1; distinct <= K; distinct++) {
    ans += dp[K][distinct] / power((Mint)M, distinct);
  }
  cout << ans << "\n";
  return 0;
}