#include <bits/stdc++.h>
using namespace std;
const long long N = 403, MOD = 1e9 + 7;
long long dp[N][2 * N];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  dp[1][0] = dp[1][1] = 1;
  for (long long k = 1; k < n; k++)
    for (long long i = 0; i <= n; i++)
      for (long long j = 0; j <= n; j++) {
        long long num = dp[k][i] * dp[k][j] % MOD;
        if (i + j + 1 < N)
          dp[k + 1][i + j + 1] = (dp[k + 1][i + j + 1] + num) % MOD;
        if (i + j < N)
          dp[k + 1][i + j] = (dp[k + 1][i + j] + num * (i + j) * 2 + num) % MOD;
        if (i + j - 1 < N)
          dp[k + 1][i + j - 1] =
              (dp[k + 1][i + j - 1] + num * (i + j) * (i + j - 1)) % MOD;
      }
  cout << dp[n][1] << " ";
  return 0;
}
