#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
const int MOD = 1e9+7;
int n, m;
long long dp[305][305][305];
int main(){
	scanf("%d%d", &n, &m);
	dp[0][1][0] = 1;
	rep(i,m) rep(j,n+1) rep(k,n-j+1){
		(dp[i+1][j+k][0] += dp[i][j][k] * j) %= MOD;
		(dp[i+1][j][k] += dp[i][j][k] * k) %= MOD;
		(dp[i+1][j][k+1] += dp[i][j][k] * (n-j-k)) %= MOD;
	}
	printf("%lld\n", dp[m][n][0]);
}