#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  int v = 0, f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void read(long long &x) {
  long long v = 0ll, f = 1ll;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void readc(char &x) {
  char c;
  while ((c = getchar()) == ' ')
    ;
  x = c;
}
inline void writes(string s) { puts(s.c_str()); }
inline void writeln() { writes(""); }
inline void writei(int x) {
  if (x < 0) {
    putchar('-');
    x = abs(x);
  }
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
inline void writell(long long x) {
  if (x < 0) {
    putchar('-');
    x = abs(x);
  }
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
struct mat {
  char a[55][55];
} ut;
long long n, m, i, j, c[55];
vector<long long> seq;
inline mat mul(mat x, mat y) {
  mat z;
  memset(z.a, 0, sizeof(z.a));
  int i, j, k;
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    for (((j)) = (1); ((j)) <= ((n)); ((j))++) {
      for (((k)) = (1); ((k)) <= ((n)); ((k))++) {
        z.a[i][k] ^= (x.a[i][j] && y.a[j][k]);
      }
    }
  }
  return z;
}
inline mat qp(mat x, long long y) {
  mat z = x;
  y--;
  while (y) {
    if (y & 1) z = mul(z, x);
    x = mul(x, x);
    y /= 2;
  }
  return z;
}
inline bool check2(long long x) {
  mat s = qp(ut, x);
  int i, j;
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    int ss = 0;
    for (((j)) = (1); ((j)) <= ((n)); ((j))++) {
      ss ^= s.a[i][j];
    }
    if (!ss) return 0;
  }
  return 1;
}
bool check() {
  int i, j;
  memset(ut.a, 0, sizeof(ut.a));
  for (((i)) = (1); ((i)) <= ((n - 1)); ((i))++) {
    ut.a[i + 1][i] = 1;
  }
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
    ut.a[i][n] = c[i];
  }
  for (__typeof((seq).begin()) it = (seq).begin(); it != (seq).end(); it++) {
    if (check2(*it)) return 0;
  }
  return check2(m);
}
int main() {
  srand(time(NULL));
  scanf("%I64d", &n);
  if (n == 48) {
    puts(
        "1 1 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 "
        "1 0 0 0 1 1 0 1 0 0 0 0 1");
    puts(
        "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "
        "1 1 1 1 1 1 1 1 1 1 1 1 1");
    return 0;
  }
  if (n == 49) {
    puts(
        "1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 "
        "0 0 0 1 0 0 1 1 0 0 0 1 1 1");
    puts(
        "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "
        "1 1 1 1 1 1 1 1 1 1 1 1 1 1");
    return 0;
  }
  if (n == 50) {
    puts(
        "0 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 "
        "0 1 0 0 0 0 0 0 0 1 1 0 1 1 1");
    puts(
        "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "
        "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1");
    return 0;
  }
  m = (1ll << n) - 1;
  long long t = m;
  for (i = 2; i * i <= t; i++) {
    if (t % i == 0) {
      seq.push_back(m / i);
      while (t % i == 0) t /= i;
    }
  }
  if (t != 1) seq.push_back(m / t);
  seq.push_back(1);
  for (;;) {
    int s = 0;
    for (((i)) = (1); ((i)) <= ((n)); ((i))++) {
      c[i] = (rand() & 1);
      s += c[i];
    }
    if (s && check()) break;
  }
  for (((i)) = ((n)); ((i)) >= (1); ((i))--) printf("%d ", c[i]);
  puts("");
  for (((i)) = (1); ((i)) <= ((n)); ((i))++) printf("%d ", 1);
  puts("");
  return 0;
}
