Find the number of the possible tuples of sequences (A_0,A_1,...,A_N) that satisfy all of the following conditions, modulo M:

* For every i (0\leq i\leq N), A_i is a sequence of length i consisting of integers between 1 and K (inclusive);
* For every i (1\leq i\leq N), A_{i-1} is a subsequence of A_i, that is, there exists 1\leq x_i\leq i such that the removal of the x_i-th element of A_i would result in a sequence equal to A_{i-1};
* For every i (1\leq i\leq N), A_i is lexicographically larger than A_{i-1}.

Constraints

* 1 \leq N,K \leq 300
* 2 \leq M \leq 10^9
* N, K and M are integers.

Input

Input is given from Standard Input in the following format:


N K M


Output

Print the number of the possible tuples of sequences (A_0,A_1,...,A_N), modulo M.

Examples

Input

2 2 100


Output

5


Input

4 3 999999999


Output

358


Input

150 150 998244353


Output

186248260
import java.io.*;
import java.util.*;

public class Main {
    FastScanner in;
    PrintWriter out;

    int mod;

    int add(int x, int y) {
        x += y;
        return x >= mod ? (x -mod) : x;
    }

    int mul(int x, int y) {
        return (int) ((x * 1L * y % mod));
    }

    void solve() {
        int n = in.nextInt();
        int k = in.nextInt();
        mod = in.nextInt();
        int[][] c = new int[n + 1][n + 1];
        c[0][0] = 1;
        for (int i = 1; i < c.length; i++) {
            c[i][0] = 1;
            for (int j = 1; j < c[i].length; j++) {
                c[i][j] = add(c[i - 1][j - 1], c[i - 1][j]);
            }
        }
        // [len][last]
        int[][] dp = new int[n + 1][k + 1];
        Arrays.fill(dp[0], 1);
        for (int curLen = 1; curLen <= n; curLen++) {
            for (int pos = 0; pos < curLen; pos++) {
                int sum = 0;
                for (int nextValue = k; nextValue >= 0; nextValue--) {
                    dp[curLen][nextValue] = add(dp[curLen][nextValue], mul(sum, mul(c[curLen - 1][pos], dp[curLen - pos - 1][nextValue])));
                    sum = add(sum, dp[pos][nextValue]);
                }
            }
        }
        out.println(dp[n][0]);
    }


    void run() {
        try {
            in = new FastScanner(new File("Main.in"));
            out = new PrintWriter(new File("Main.out"));

            solve();

            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {

        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    public static void main(String[] args) {
        new Main().runIO();
    }
}