#include <bits/stdc++.h>
using namespace std;
const int MX = 405;
const long long mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
long long f[MX][MX];
int main(void) {
  int n;
  scanf("%d", &n);
  f[1][1] = f[1][0] = 1;
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j <= n; j++) {
      for (int k = 0; k + j <= n; k++) {
        long long t = f[i - 1][j] * f[i - 1][k] % mod;
        (f[i][j + k] += t % mod * ((j + k) * 2 + 1)) %= mod;
        (f[i][j + k + 1] += t) %= mod;
        (f[i][j + k - 1] += t * (j + k) * (j + k - 1)) %= mod;
      }
    }
  }
  printf("%I64d\n", f[n][1]);
  return 0;
}
