#include <bits/stdc++.h>
using namespace std;
int K;
long long paths[444][444];
int main(int argc, char *argv[]) {
  scanf("%d", &K);
  paths[0][1] = 1;
  paths[1][1] = 1;
  for (int k = (2); k <= (K); k++) {
    for (int p = (0); p <= (K + 1); p++) {
      for (int a = (0); a <= (p - 1); a++)
        paths[p][k] =
            (paths[p][k] + paths[a][k - 1] * paths[p - 1 - a][k - 1]) %
            1000000007;
      for (int a = (0); a <= (p); a++)
        paths[p][k] = (paths[p][k] + paths[a][k - 1] * paths[p - a][k - 1] %
                                         1000000007 * (2 * p + 1)) %
                      1000000007;
      for (int a = (0); a <= (p + 1); a++)
        paths[p][k] =
            (paths[p][k] + paths[a][k - 1] * paths[p + 1 - a][k - 1] %
                               1000000007 * (p + 1) % 1000000007 * p) %
            1000000007;
    }
  }
  printf("%d\n", (int)(paths[1][K]));
  return 0;
}
