#include <bits/stdc++.h>
using namespace std;
const int K = 405;
const long long mod = 1e9 + 7;
long long ncr[K][K], paths[K][K];
void init() {
  memset(ncr, 0, sizeof(ncr));
  ncr[0][0] = 1;
  for (int n = 1; n < K; n++) {
    ncr[n][0] = 1;
    for (int r = 1; r <= n; r++) {
      ncr[n][r] = ncr[n - 1][r] + ncr[n - 1][r - 1];
      if (ncr[n][r] >= mod) ncr[n][r] -= mod;
    }
  }
  memset(paths, 0, sizeof(paths));
  paths[1][0] = paths[1][1] = 1;
  for (int k = 2; k < K; k++) {
    for (int r = 0; r < K; r++) {
      for (int a = 0; a <= r; a++) {
        long long tmp = paths[k - 1][a] * paths[k - 1][r - a] % mod;
        tmp = tmp * (1 + r + r) % mod;
        paths[k][r] += tmp;
      }
      for (int a = 1; a <= r; a++) {
        long long tmp = paths[k - 1][a + 1] * paths[k - 1][r - a] % mod;
        tmp = tmp * ((a + 1) * a % mod) % mod;
        paths[k][r] += tmp * 2;
      }
      for (int a = 0; a < r; a++) {
        long long tmp = paths[k - 1][a + 1] * paths[k - 1][r - a] % mod;
        tmp = tmp * ((a + 1) * (r - a) % mod) % mod;
        paths[k][r] += tmp * 2;
      }
      for (int a = 0; a <= r - 1; a++) {
        long long tmp = paths[k - 1][a] * paths[k - 1][r - 1 - a] % mod;
        paths[k][r] += tmp;
      }
      paths[k][r] %= mod;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(32);
  init();
  int k;
  cin >> k;
  cout << paths[k][1] << '\n';
  return 0;
}
