#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;
 
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;

typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<double,double> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pi> vpi;

template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)

#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()

const int MOD = 1000000007;
const double PI = 4*atan(1);
const ll INF = 1e18;
const int MX = 100001;

set<vi> ret;
map<vi,int> z;

vi operator*(int a, vi b) {
    F0R(i,sz(b)) b[i] *= a;
    return b;
}

vi operator-(vi a, vi b) {
    F0R(i,sz(a)) a[i] -= b[i];
    return a;
}

void search(vector<vi> t) {
    if (sz(t) == 1) {
        ret.insert(t[0]);
        return;
    }
    F0R(i,sz(t)) F0R(j,sz(t)) if (i != j) {
        vector<vi> res;
        F0R(k,sz(t)) if (k != i && k != j) res.pb(t[k]);
        res.pb(2*t[j]-t[i]);
        search(res);
    }
}

void brute(int sz) {
    vector<vi> t;
    F0R(i,sz) {
        vi x(sz); x[i] = 1;
        t.pb(x);
    }
    z.clear(); ret.clear();
    search(t);
    for (auto a: ret) {
        vi b; for (int i: a) b.pb(i);
        sort(all(b));
        z[b] ++;
        /*for (int j: a) cout << j << " ";
        cout << "\n";*/
    }
    cout << sz << "\n";
    for (auto a: z) {
        for (int j: a.f) cout << j << " ";
        cout << "| ";
        cout << a.s << "\n";
    }
    cout << "OH " << sz << " " << sz(ret) << "\n";
}

int dp[55][55][105]; // current ind, current #, current balance

int ad(ll a, ll b) {
    return (a+b)%MOD;
}

int mult(ll a, ll b) {
    return (a*b)%MOD;
}

ll fac[51], ifac[51];

ll po(ll b, ll p) {
    return !p?1:po(b*b%MOD,p/2)*(p&1?b:1)%MOD;
}

ll inv(ll x) {
    return po(x,MOD-2);
}

void smart(int ind) {
    
    memset(dp,0,sizeof dp);
    dp[0][1][50] = dp[0][1][49] = 1;
    
    int ans = 0,co = 0;
    F0R(i,ind) FOR(j,1,ind+1) F0R(k,101) if (dp[i][j][k]) { 
        co ++;
        F0R(x,ind-j+1) F0R(y,ind-j-x+1) if (x+y > 0) {
            int t = k+x-y;
            if (t % 2 == 0 && k+x+y >= 50 && k-x-y <= 50) {
                int tmp = mult(mult(dp[i][j][k],fac[j+x+y]),mult(mult(ifac[x],ifac[y]),ifac[j]));
                dp[i+1][j+x+y][(t-50)/2+50] = ad(dp[i+1][j+x+y][(t-50)/2+50],tmp);
            }
        }
        if (j == ind && k == 50) ans = ad(ans,dp[i][j][50]);
    }
    
    cout << ans << "\n";
}

set<vi> posi[51];

void SMART(int x) {
    posi[1].insert({1});
    FOR(i,2,x+1) {
        FOR(j,1,i) {
            for (auto a: posi[j]) for (auto b: posi[i-j]) {
                vi res; 
                for (int i: a) res.pb(2*i);
                for (int i: b) res.pb(-i);
                sort(all(res));
                posi[i].insert(res);
            }
        }
    }
    ll ans = 0;
    for (auto a: posi[x]) {
        map<int,int> co;
        for (int i: a) {
            // cout << i << " ";
            co[i] ++;
        }
        ll z = fac[x]; 
        bool zz = 0;
        for (auto a: co) {
            z = mult(z,ifac[a.s]);
            if (2*a.s > x) zz = 1;
        }
        if (zz) {
            for (int i: a) cout << i << " ";
            cout << "\n";
        }
        ans = ad(ans,z);
    }
    cout << ans << "\n";
}

void search(int ind, vi cur, int sum = 0) {
    /*for (int i: cur) cout << i << " ";
    cout << "\n";
    cout << ind << " " << sum << "\n";
    cout << "----\n";*/
    if (sz(cur) == 9) {
        if (sum != 0) return;
        sort(all(cur));
    } else {
        F0R(i,10-sz(cur)) F0R(j,10-sz(cur)-i) if (i+j > 0 && (ind != 0 || (i+j == 1))) {
            vi CUR = cur;
            F0R(k,i) CUR.pb((1<<ind));
            F0R(k,j) CUR.pb(-(1<<ind));
            if ((sum+i-j) % 2 == 0) search(ind+1,CUR,(sum+i-j)/2);
        }
    }
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    fac[0] = ifac[0] = 1;
    FOR(i,1,51) {
        fac[i] = mult(i,fac[i-1]);
        ifac[i] = inv(fac[i]);
        assert(mult(fac[i],ifac[i]) == 1);
    }
    
    int n; cin >> n;
    smart(n);
    // smart(9);
    // SMART(9);
    // search(1,{1},0);
    // search(1,{-1},-1);
}

// read the question correctly (is y a vowel?)
// look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)

Measured memory_bytes: 1536