#include<cstdio>
#include<iostream>
#include<cstring>
#define RG register
#define LL long long
using namespace std;
const LL mod=1e9+7;
int n,m;
LL dp[305][305][305];
inline int read(){
	char ch=getchar(); int x=0, f=1;
	while(ch<'0' || ch>'9'){if(ch=='-') f=-1; ch=getchar();	}
	while(ch>='0' && ch<='9'){x=x*10+ch-'0'; ch=getchar();	}
	return x*f;}
int main()
{
//	freopen("Road of the King.in","r",stdin);
	n=read(); m=read();
	dp[0][1][1]=1;
	for(RG int i=0;i<m;i++)
	 for(RG int j=1;j<=n;j++)
	  for(RG int k=1;k<=j;k++)
	  {
			(dp[i+1][j+1][k]+=dp[i][j][k]*(n-j))%=mod;
			(dp[i+1][j][k]+=dp[i][j][k]*(j-k))%=mod;
			(dp[i+1][j][j]+=dp[i][j][k]*k)%=mod;
	  }
	printf("%lld\n",dp[m][n][n]);
	return 0;
}