#include <bits/stdc++.h>
using namespace std;
int k;
long long M;
vector<long long> D;
void mul(long long *c, long long *a, long long *b) {
  memset(c, 0, k * sizeof(long long));
  for (int i(0); i < k; ++i)
    for (int j(0); j < k; ++j)
      if (a[i] & 1ll << j) c[i] ^= b[j];
}
void mul(long long *a, long long *b) {
  long long c[k];
  memcpy(c, a, k * sizeof(long long));
  mul(a, c, b);
}
void sqr(long long *a) {
  long long c[k];
  memcpy(c, a, k * sizeof(long long));
  mul(a, c, c);
}
int mpow(long long *A, long long n) {
  long long a[k], b[k];
  for (int i(0); i < k; ++i) {
    a[i] = A[i];
    b[i] = 1ll << i;
  }
  for (; n; n >>= 1, sqr(a))
    if (n & 1) mul(b, a);
  for (int i(0); i < k; ++i)
    if (b[i] == 0) return 0;
  for (int i(0); i < k; ++i)
    if (b[i] != (1ll << i)) return -1;
  return 1;
}
bool check(long long c) {
  long long a[k];
  for (int i(0); i < k - 1; ++i) a[i] = 1ll << (i + 1);
  a[k - 1] = 0;
  for (int i(0); i < k; ++i)
    if ((c >> i) & 1) a[k - 1] |= 1ll << (k - 1 - i);
  if (mpow(a, M) != 1) return false;
  for (long long x : D)
    if (mpow(a, x) != -1) return false;
  return true;
}
int main() {
  cin >> k;
  M = (1ll << k) - 1;
  long long x = rand();
  for (long long i = 2; i * i <= M; ++i)
    if (M % i == 0) {
      D.push_back(i);
      if (i * i != M) D.push_back(M / i);
    }
  for (;;) {
    x = (x * 98723472623985767 ^ rand()) & M;
    long long y = x | (1 << (k - 1));
    if (check(y)) {
      for (int i(0); i < k; ++i) {
        if (i) putchar(' ');
        cout << ((y >> i) & 1);
      }
      puts("");
      for (int i(0); i < k; ++i) {
        if (i) putchar(' ');
        cout << 1;
      }
      return 0;
    }
  }
  return 0;
}
