#include <bits/stdc++.h>

typedef long long LL;
const int N = 305;
int n, k, mod, a[N], b[N], c[N][N];

void reduce(int &x) { x += x >> 31 & mod; }
void exp() {
	for (int i = 0; i <= n; ++i) b[i] = a[i];
	for (int i = 0; i <= n; ++i)
		for (int j = 1; j <= i; ++j)
			b[i] = (b[i] + (LL) b[j - 1] * a[i - j] % mod * c[i][j]) % mod;
	for (int i = 0; i <= n; ++i) a[i] = b[i];
}

int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> n >> k >> mod;
	for (int i = 0; i <= n; ++i) {
		c[i][0] = 1;
		for (int j = 1; j <= i; ++j)
			reduce(c[i][j] = c[i - 1][j] + c[i - 1][j - 1] - mod);
	}
	a[0] = 1; while (k--) exp();
	std::cout << a[n] << '\n';
	return 0;
}