#include <bits/stdc++.h>
#define fo(a,b,c) for (a=b; a<=c; a++)
#define fd(a,b,c) for (a=b; a>=c; a--)
#define C(n,m) ((jc[n]*Jc[m])%1000000007*Jc[(n)-(m)]%1000000007)
#define add(a,b) a=((a)+(b))%1000000007
#define abs(x) ((x)>0?(x):-(x))
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define mod 1000000007
#define Mod 1000000005
#define ll long long
//#define file
using namespace std;

ll f[51][51],jc[51],Jc[51];
int n,i,j,k,l,x;

ll qpower(ll a,int b) {ll ans=1; while (b) {if (b&1) ans=ans*a%mod;a=a*a%mod;b>>=1;} return ans;}

int main()
{
	#ifdef file
	freopen("agc022f.in","r",stdin);
	#endif
	
	scanf("%d",&n);
	jc[0]=1;
	fo(i,1,n) jc[i]=jc[i-1]*i%mod;
	Jc[n]=qpower(jc[n],Mod);
	fd(i,n-1,0) Jc[i]=Jc[i+1]*(i+1)%mod;
	
	f[1][0]=f[1][1]=1;
	fo(i,1,n-1)
	{
		fo(j,0,i)
		{
			fo(k,max(1,j),n-i)
			{
				fo(l,0,k)
				if (!((j+k)&1))
				{
					x=(j+k)/2;
					add(f[i+k][abs(x-l)],f[i][j]*C(i+k,i)%mod*C(k,l));
				}
			}
		}
	}
	printf("%lld\n",f[n][0]);
	
	fclose(stdin);
	fclose(stdout);
	return 0;
}