#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstdlib>
#include <ctime>
#include <deque>
using namespace std;

#define P 1000000007
int n, m;
long long dp[310][310][310], dp1[310][310];

void up(long long &x, long long y) {
	x = (x + y) % P;
}

int main() {
	scanf("%d%d", &n, &m);
	dp1[0][1] = 1;
	for (int i = 1; i <= m; i++) {
		for (int j = 0; j <= n; j++)
			for (int p = 0; j + p <= n; p++)
				if (dp[i - 1][j][p]) {
					up(dp[i][j][p], 1LL * dp[i - 1][j][p] * j % P);
					up(dp[i][0][j + p], 1LL * dp[i - 1][j][p] * p % P);
					up(dp[i][j + 1][p], 1LL * dp[i - 1][j][p] * (n - j - p) % P);
				}
		for (int j = 1; j <= n; j++)
			if (dp1[i - 1][j]) {
				if (j < n) {
					up(dp1[i][j + 1], dp1[i - 1][j] * (n - j) % P);
				}
				up(dp1[i][j], dp1[i - 1][j] * (j - 1) % P);
				up(dp[i][0][j], dp1[i - 1][j]);
			}
	}
	cout << dp[m][0][n] << endl;
}