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 JAVA):

Solution:
/**
 * author: derrick20
 * created: 2/5/21 11:25 AM
 */
import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class CardsOnto {
    static FastScanner sc = new FastScanner();
    static PrintWriter out = new PrintWriter(System.out);
    
    public static void main(String[] args) {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int K = sc.nextInt();

        long indicator = inverse(M);
        long curr = indicator;
        long EV = 0;
        long[] mappings = new long[K + 1]; // Kth power
        long[][] choose = new long[K + 1][K + 1];
        choose[0][0] = 1;
        for (int g = 1; g <= K; g++) {
            mappings[g] = 1;
            choose[g][0] = choose[g][g] = 1;
            for (int p = 1; p <= K; p++) {
                mappings[g] = g * mappings[g] % mod;
                if (p < g) {
                    choose[g][p] = (choose[g - 1][p - 1] + choose[g - 1][p]) % mod;
                }
            }
        }
        long[] inv = new long[K + 1];
        inv[1] = 1;
        long uniquify = 1;
        long assignments = N;
        for (int g = 1; g <= K; g++) {
            long onto = mappings[g];
            for (int g2 = g - 1, sign = -1; g2 >= 1; g2--, sign *= -1) {
                long amt = sign * choose[g][g2] * mappings[g2] % mod;
                if (amt < 0) {
                    amt += mod;
                }
                onto = (onto + amt) % mod;
            }
            if (g >= 2) {
                inv[g] = (mod - mod / g) * inv[mod % g] % mod;
            }
            uniquify = uniquify * inv[g] % mod;
            long contrib = onto * uniquify % mod * assignments % mod * curr % mod;
            EV = (EV + contrib) % mod;
            curr = curr * indicator % mod;
            assignments = assignments * (N - g) % mod;
        }
        out.println(EV);
        out.close();
    }

    static int mod = 998244353;

    static long inverse(long x) {
        return fastExpo(x, mod - 2);
    }
    static long fastExpo(long x, long k) {
        long ans = 1;
        for (; k > 0; k >>= 1, x = x * x % mod) {
            if (k % 2 == 1) {
                ans = ans * x % mod;
            }
        }
        return ans;
    }

    static class FastScanner {
        private int BS = 1 << 16;
        private char NC = (char) 0;
        private byte[] buf = new byte[BS];
        private int bId = 0, size = 0;
        private char c = NC;
        private double cnt = 1;
        private BufferedInputStream in;
    
        public FastScanner() {
            in = new BufferedInputStream(System.in, BS);
        }
    
        public FastScanner(String s) {
            try {
                in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
            } catch (Exception e) {
                in = new BufferedInputStream(System.in, BS);
            }
        }
    
        char getChar() {
            while (bId == size) {
                try {
                    size = in.read(buf);
                } catch (Exception e) {
                    return NC;
                }
                if (size == -1) return NC;
                bId = 0;
            }
            return (char) buf[bId++];
        }
    
        int nextInt() {
            return (int) nextLong();
        }
    
        long nextLong() {
            cnt = 1;
            boolean neg = false;
            if (c == NC) c = getChar();
            for (; (c < '0' || c > '9'); c = getChar()) {
                if (c == '-') neg = true;
            }
            long res = 0;
            for (; c >= '0' && c <= '9'; c = getChar()) {
                res = (res << 3) + (res << 1) + c - '0';
                cnt *= 10;
            }
            return neg ? -res : res;
        }
    
        double nextDouble() {
            boolean neg = false;
            if (c == NC) c = getChar();
            for (; (c < '0' || c > '9'); c = getChar()) {
                if (c == '-') neg = true;
            }
            double cur = nextLong();
            if (c != '.') {
                return neg ? -cur : cur;
            } else {
                double frac = nextLong() / cnt;
                return neg ? -cur - frac : cur + frac;
            }
        }
    
        String next() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c > 32) {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }
    
        String nextLine() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c != '\n') {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }
    
        boolean hasNext() {
            if (c > 32) return true;
            while (true) {
                c = getChar();
                if (c == NC) return false;
                else if (c > 32) return true;
            }
        }
    }
    
    static void ASSERT(boolean assertion, String message) {
        if (!assertion) throw new AssertionError(message);
    }
    
    static void ASSERT(boolean assertion) {
        if (!assertion) throw new AssertionError();
    }
}