#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;

const int MaxN = 50;
const int MaxM = MaxN * 2;
const int M = 1000000007;

int n;
int a[MaxM + 1];

int f[MaxN + 1][MaxM + 1][MaxM + 1];

int main()
{
	cin >> n;
	for (int i = 1; i < n * 2; ++i)
		cin >> a[i];

	sort(a + 1, a + n * 2);

	f[n][1][1] = 1;
	for (int i = n; i > 1; --i)
		for (int j = 1; j <= (n - i) * 2 + 1; ++j)
			for (int k = 1; k <= j; ++k)
			{
				int cur = f[i][j][k];
				if (cur == 0)
					continue;

				int p = i - 1, q = n * 2 - i + 1;
				int u = j + (a[p] != a[p + 1]) + (a[q] != a[q - 1]);
				int v = k + (a[p] != a[p + 1]);

				for (int l = 1; l <= u; ++l)
				{
					int x = u - max(0, abs(l - v) - 1);
					int y = l <= v ? l : v + 1;
					f[p][x][y] = (f[p][x][y] + cur) % M;
				}
			}

	int res = 0;
	for (int i = 1; i <= n * 2 + 1; ++i)
		for (int j = 1; j <= i; ++j)
			res = (res + f[1][i][j]) % M;

	cout << res << endl;

	return 0;
}