import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop, core.stdc.string; immutable long MOD = 10^^9 + 7; void main() { auto N = readln.chomp.to!int; auto dp = new long[][][](2, N+5, 2*N+5); dp[0][0][0] = 1; foreach (i; 0..N) { int cur = i & 1; int tar = cur ^ 1; foreach (j; 0..N+5) fill(dp[tar][j], 0); foreach (j; 0..N+1) foreach (k; 0..2*N+1) { (dp[tar][j][k+2] += dp[cur][j][k]) %= MOD; (dp[tar][j][k+1] += dp[cur][j][k] * 2 * (j+k)) %= MOD; (dp[tar][j][k] += dp[cur][j][k] * ((j+k) * (j+k) - k)) %= MOD; (dp[tar][j+1][k] += dp[cur][j][k]) %= MOD; if (k > 0) (dp[tar][j+1][k-1] += dp[cur][j][k] * k) %= MOD; } } long ans = 0; foreach (i; 1..N+1) (ans += dp[N % 2][i][0]) %= MOD; ans.writeln; }