#include <iostream>
#define int long long
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;

int mod = 1000000007;
int n, m;
int dp[301][301][301];	//{S}から出る→冒険する(T)→{S}へ戻る. dp[移動回数][|S|][|T|].

signed main() {
	int i, j, k;
	
	cin >> n >> m;
	
	dp[0][1][0] = 1;
	rep(i, m) {
		rep(j, n + 1) {
			//k = 0. S->S. S->new
			(dp[i + 1][j][0] += j * dp[i][j][0]) %= mod;
			(dp[i + 1][j][1] += (n - j) * dp[i][j][0]) %= mod;
			//else
			for (k = 1; k <= n; k++) {
				if (dp[i][j][k] == 0) continue;
				//T->S, T->T, T->new
				(dp[i + 1][j + k][0] += j * dp[i][j][k]) %= mod;
				(dp[i + 1][j][k] += k * dp[i][j][k]) %= mod;
				(dp[i + 1][j][k + 1] += (n - j - k) * dp[i][j][k]) %= mod;
			}
		}
	}
	
	cout << dp[m][n][0] << endl;
	return 0;
}