#include <iostream>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <stack>
#include <assert.h>
#define Endl endl
#define mp make_pair
#define ll long long 
#define pii pair<int,int>
#define pll pair<ll,ll>
#define over(A) {cout<<A<<endl;exit(0);}
#define all(A) A.begin(),A.end()
#define ceil(a,b) ((a-1)/b+1)
#define srand() mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rand(l,r) uniform_int_distribution<int>(l,r)(rng)
typedef unsigned long long ull;
const int inf=1039074182;
//const int mod=1e9+7;
using namespace std;
int dp[5005][5005];
vector <int> vec[5005];
int n;
int par[5005];
int son[5005];
vector <int> sumson[5005];
int f[5005];

namespace combinatorics
{
	int *fac;
	int *ifac;
	int mod;
	inline int add(int a,int b)
	{
		return (a+b)%mod;
	}
	inline int minus(int a,int b)
	{
		return (a-b+mod)%mod;
	}
	inline int multiply(int a,int b)
	{
		return (1LL*a*b)%mod;
	}
	inline int fastpow(int basic,int x)
	{
		int res=1;
		while(x)
		{
			if(x&1)	res=multiply(res,basic);
			basic=multiply(basic,basic);
			x>>=1;
		}
		return res;
	}
	inline int inv(int x)
	{
		return fastpow(x,mod-2);
	}
	void init(int n,int tmod)
	{
		mod=tmod;
		fac=new int[n+5];
		ifac=new int[n+5];
		fac[0]=1;
		for(int i=1;i<=n;i++)
		{
			fac[i]=multiply(fac[i-1],i);
		}
		ifac[n]=inv(fac[n]);
		for(int i=n-1;i>=0;i--)
		{
			ifac[i]=multiply(ifac[i+1],i+1);
		}
	}
	inline int C(int n,int m)
	{
		return multiply(multiply(fac[n],ifac[m]),ifac[n-m]);
	}
	inline int Cat(int x)
	{
		return multiply(C(x*2,x),inv(x+1));
	}
};
using namespace combinatorics;

void go(int x,int p=-1)
{
	son[x]=1;
	par[x]=p;
	for(int i=0;i<vec[x].size();i++)
	{
		if(vec[x][i]==p) continue;
		go(vec[x][i],x);
		son[x]+=son[vec[x][i]];
	}
}

void dfs(int x)
{
//	cout<<x<<endl;
	for(int i=0;i<vec[x].size();i++)
	{
		dfs(vec[x][i]);
	}
	int n=vec[x].size();
	int dp2[n+1][son[x]+1];
	memset(dp2,0,sizeof(dp2));
	dp2[0][1]=1;
	int tmp;
	for(int i=0;i<n;i++)
	{
//		for(int parity=0;parity<2;parity++)
//		{
			for(int remain=0;remain<=sumson[x][i]-son[vec[x][i]]+1;remain++)
			{
				for(int sz=0;sz<=son[vec[x][i]];sz++)
				{
//					for(int ncut=0;ncut<2;ncut++)
//					{
						dp2[i+1][remain+sz]+=(1LL*dp2[i][remain]*dp[vec[x][i]][sz]%mod);
						if(dp2[i+1][remain+sz]>=mod) dp2[i+1][remain+sz]-=mod;
						dp2[i+1][remain]-=(1LL*dp2[i][remain]*dp[vec[x][i]][sz]%mod*f[sz]%mod);
						if(dp2[i+1][remain]<0) dp2[i+1][remain]+=mod;
//						tmp=1LL*dp2[i][parity][remain]*dp[vec[x][i]][ncut][sz]%mod;
//						dp2[i+1][parity^1^ncut][remain]=(dp2[i+1][parity^1^ncut][remain]+1LL*tmp*f[sz]%mod);
//						if(dp2[i+1][parity^1^ncut][remain]>=mod) dp2[i+1][parity^1^ncut][remain]-=mod;
//						dp2[i+1][parity^ncut][remain+sz]=(dp2[i+1][parity^ncut][remain+sz]+tmp);
//						if(dp2[i+1][parity^ncut][remain+sz]>=mod) dp2[i+1][parity^ncut][remain+sz]-=mod;
//					}
				}
			}
//		}
	}
	for(int remain=0;remain<=son[x];remain++)
	{
		dp[x][remain]=dp2[n][remain];
	}
}

int main()
{
	memset(dp,0,sizeof(dp));
	cin>>n;
	init(n+5,1e9+7);
	f[0]=1;
	for(int i=2;i<=n;i+=2)
	{
		f[i]=multiply(multiply(fac[i],ifac[i/2]),inv(fastpow(2,i/2)));
	}
//	cout<<f[2000]<<endl;
	int x,y;
	for(int i=0;i<n-1;i++)
	{
		scanf("%d%d",&x,&y);
		x--;
		y--;
		vec[x].push_back(y);
		vec[y].push_back(x);
	}
	go(0);
	for(int i=1;i<n;i++)
	{
		bool flag=false;
		for(int j=0;j<(int)vec[i].size()-1;j++)
		{
			if(vec[i][j]==par[i])
			{
				flag=true;
			}
			if(flag) vec[i][j]=vec[i][j+1];
		}
		vec[i].resize((int)vec[i].size()-1);
	}
	for(int i=0;i<n;i++)
	{
		sumson[i].resize(vec[i].size());
		for(int j=0;j<vec[i].size();j++)
		{
			sumson[i][j]=(j?sumson[i][j-1]:0)+son[vec[i][j]];
		}
	}
	dfs(0);
	ll res=0;
//	for(int j=0;j<2;j++)
//	{
//		for(int i=0;i<=son[1];i++)
//		{
//			cout<<dp[1][j][i]<<' ';
//		}
//		cout<<endl;
//	}
	for(int i=0;i<=son[0];i++)
	{
		res=(res+1LL*dp[0][i]*f[i])%mod;
//		res+=dp[0][0][i]*f[i];
//		res-=dp[0][1][i]*f[i];
	}
	cout<<res<<endl;
	return 0;
}

Measured memory_bytes: 196224