#include <cstdio>
#include <algorithm>

#define Int register int

const int MAXN = 50, MOD = 1e9 + 7;
int n, m, a[MAXN * 2 + 5], F[MAXN + 5][MAXN * 2 + 5][MAXN * 2 + 5];

inline void Add ( int& a, const int b ) { if ( ( a += b ) >= MOD ) a -= MOD; }

inline void Work () {
	scanf ( "%d", &n ), m = ( n << 1 ) - 1;
	for ( Int i = 1; i <= m; ++ i ) scanf ( "%d", &a[i] );
	std :: sort ( a + 1, a + m + 1 );
	F[n][0][0] = 1;
	for ( Int i = n; i ^ 1; -- i ) {
		bool ul = a[i] ^ a[i - 1], ur = a[m - i + 1] ^ a[m - i + 2];
		for ( Int j = 0; j <= m; ++ j ) {
			for ( Int k = 0, now; k <= m; ++ k ) {
				if ( ! ( now = F[i][j][k] ) ) continue;
				Add ( F[i - 1][j + ul][k + ur], now );
				for ( Int t = 0; t < j + ul; ++ t ) Add ( F[i - 1][t][k + ur + 1], now );
				for ( Int t = 0; t < k + ur; ++ t ) Add ( F[i - 1][j + ul + 1][t], now );
			}
		}
	}
	int Ans = 0;
	for ( Int i = 0; i <= m; ++ i ) {
		for ( Int j = 0; j <= m; ++ j ) {
			Add ( Ans, F[1][i][j] );
		}
	}
	printf ( "%d\n", Ans );
}

int main () {
//	freopen ( "hardest.in", "r", stdin );
//	freopen ( "hardest.out", "w", stdout );
	Work ();
	return 0;
}