#include <bits/stdc++.h>
using namespace std;
int pfix(int x) { return x >= 1000000007 ? x - 1000000007 : x; }
int dp[2][405];
int main() {
  int n;
  scanf("%d", &n);
  dp[1][0] = dp[1][1] = 1;
  for (int i = 2; i <= n; ++i) {
    memset(dp[i & 1], 0, (n + 1) * sizeof(int));
    for (int j = 0; j <= n; ++j) {
      for (int k = 0; k <= n; ++k) {
        if (j + k > n + 1) break;
        if (j + k < n)
          dp[i & 1][j + k + 1] =
              (dp[i & 1][j + k + 1] +
               1LL * dp[!(i & 1)][j] % 1000000007 * dp[!(i & 1)][k]) %
              1000000007;
        if (j + k < n + 1)
          dp[i & 1][j + k] =
              (dp[i & 1][j + k] + 1LL * (2 * j + 2 * k + 1) * dp[!(i & 1)][j] %
                                      1000000007 * dp[!(i & 1)][k]) %
              1000000007;
        if (j + k > 1)
          dp[i & 1][j + k - 1] =
              (dp[i & 1][j + k - 1] + 1LL * (j + k) * (j + k - 1) *
                                          dp[!(i & 1)][j] % 1000000007 *
                                          dp[!(i & 1)][k]) %
              1000000007;
      }
    }
  }
  printf("%d\n", dp[n & 1][1]);
}
