#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;
using D = double;
using uint = unsigned int;

#ifdef WIN32
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second

const int MOD = 1000000007;
const int maxn = 305;

int cnk[maxn][maxn];
int ans[maxn][maxn];
int ans2[maxn][maxn][maxn];
int kk[maxn][maxn];
int pw[maxn][maxn];
int n, m;
int f[maxn];

void add(int &x, ll y)
{
    x = (x + y) % MOD;
}

int main()
{
    scanf("%d%d", &n, &m);
    cnk[0][0] = 1;
    for (int i = 1; i <= n; i++)
    {
        cnk[i][0] = 1;
        for (int j = 1; j <= i; j++) cnk[i][j] = (cnk[i - 1][j - 1] + cnk[i - 1][j]) % MOD;
    }
    f[0] = 1;
    for (int i = 1; i <= n; i++) f[i] = ((ll)f[i - 1] * i) % MOD;
    for (int i = 1; i <= n; i++)
    {
        pw[i][0] = 1;
        for (int j = 1; j <= m; j++) pw[i][j] = ((ll)pw[i][j - 1] * i) % MOD;
    }
    kk[0][0] = 1;
    for (int i = 1; i <= n; i++)
    {
        for (int j = i; j <= m; j++)
        {
            for (int t = i; t >= i; t--) add(kk[i][j], (((ll)kk[i - 1][t - 1] * pw[i][j - t]) % MOD) * i);
        }
    }
//     cout << f[n - 1] << endl;
//     ans[0][1] = 1;
//     for (int i = 0; i < m; i++)
//     {
//         for (int j = 1; j <= n; j++) if (ans[i][j] != 0)
//         {
// //             cout << i << ' ' << j << ' ' << ans[i][j] << endl;
//             for (int k = 0; k <= n - j && i + k + 1 <= m; k++)
//             {
//                 for (int t = 0; i + k + t + 1 <= m; t++)
//                 {
//                     add(ans[i + k + t + 1][j + k], (((ll)ans[i][j] * kk[k][k + t]) % MOD) * j);
//                 }
//             }
//         }
//     }
//     cout << ans[m][n] << endl;
    ans2[0][1][0] = 1;
    for (int i = 0; i < m; i++)
    {
        for (int j = 1; j <= n; j++)
        {
            for (int k = 0; k + j <= n; k++) if (ans2[i][j][k] != 0)
            {
                add(ans2[i + 1][j + k][0], ((ll)ans2[i][j][k] * j));
                add(ans2[i + 1][j][k], ((ll)ans2[i][j][k] * k));
                add(ans2[i + 1][j][k + 1], ((ll)ans2[i][j][k] * (n - j - k)));
            }
        }
    }
    int answer = 0;
    for (int i = 0; i < n; i++) add(answer, ans2[m][n][i]);
    cout << answer << endl;
    return 0;
}