#include <bits/stdc++.h>
using namespace std;
int n, len = 0;
long long m = 1, a[2000];
bool A[60][60], B[60][60], f[60], g[60];
bool c[60];
void find_factor() {
  for (int i = 1; i <= n; ++i) m <<= 1;
  --m;
  long long k = m;
  for (long long i = 2; i * i <= k; ++i)
    if (k % i == 0) {
      a[++len] = m / i;
      while (k % i == 0) k /= i;
    }
  if (k > 1) a[++len] = m / k;
  a[++len] = 1;
}
bool ok(const long long x) {
  for (int i = 1; i <= n; ++i) f[i] = 1;
  memset(A, 0, sizeof(A));
  for (int i = 1; i <= n; ++i)
    A[i][n] = c[n - i + 1], A[i][i - 1] = 1, f[i] = 1;
  for (long long X = x; X > 0; X >>= 1) {
    if (X & 1) {
      for (int i = 1; i <= n; ++i) {
        g[i] = 0;
        for (int j = 1; j <= n; ++j) g[i] ^= (f[j] & A[j][i]);
      }
      for (int i = 1; i <= n; ++i) f[i] = g[i];
    }
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j) {
        B[i][j] = 0;
        for (int k = 1; k <= n; ++k) B[i][j] ^= (A[i][k] & A[k][j]);
      }
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j) A[i][j] = B[i][j];
  }
  for (int i = 1; i <= n; ++i)
    if (!f[i]) return 0;
  return 1;
}
bool make_line() {
  for (int i = 1; i <= n; ++i) c[i] = (rand() & 1);
  if (!ok(m)) return 0;
  for (int i = 1; i <= len; ++i)
    if (ok(a[i])) return 0;
  return 1;
}
int main() {
  srand(19951124);
  scanf("%d", &n);
  find_factor();
  while (!make_line())
    ;
  for (int i = 1; i <= n; ++i) printf("%d ", c[i]);
  puts("");
  for (int i = 1; i <= n; ++i) printf("1 ");
  puts("");
  return 0;
}
