#include <bits/stdc++.h>
int k, P, tail;
long long int prime[1000000], chklist[100000], X;
struct matrix {
  int a[51][51];
} matmp, matans, mat, mat0[52];
void find_prime() {
  int i, j;
  for (i = 2; (long long int)i * (long long int)i <= X; i++) {
    if (X % i) continue;
    for (j = 1; j <= P; j++)
      if (i % prime[j] == 0) break;
    if (j == P + 1) prime[++P] = i;
  }
}
void matmulti(matrix A, matrix B) {
  int u, i, j;
  for (i = 1; i <= k; i++)
    for (j = 1; j <= k; j++) matmp.a[i][j] = 0;
  for (u = 1; u <= k; u++)
    for (i = 1; i <= k; i++)
      for (j = 1; j <= k; j++)
        matmp.a[i][j] = (matmp.a[i][j] + A.a[i][u] * B.a[u][j]) % 2;
}
bool ok(long long int x) {
  long long int b;
  int i, j;
  for (i = 1; i <= k; i++)
    for (j = 1; j <= k; j++) matans.a[i][j] = i == j ? 1 : 0;
  for (b = 1, j = 0; b <= x; b *= 2, j++) {
    if (b & x) {
      matmulti(mat0[j], matans);
      matans = matmp;
    }
  }
  for (i = 1; i <= k; i++)
    for (j = 1; j <= k; j++) {
      if (i == j && matans.a[i][j] != 1) return false;
      if (i != j && matans.a[i][j] != 0) return false;
    }
  return true;
}
bool check() {
  int i, j;
  long long int b;
  mat0[0] = mat;
  for (j = 1, b = 2; b <= X; b *= 2, j++) {
    matmulti(mat0[j - 1], mat0[j - 1]);
    mat0[j] = matmp;
  }
  if (!ok(chklist[0])) return false;
  for (i = 1; i <= tail; i++)
    if (ok(chklist[i])) break;
  if (i == tail + 1) {
    for (i = k; i >= 1; i--) printf("%d ", mat.a[i][k]);
    printf("\n");
    for (i = 1; i < k; i++) printf("0 ");
    printf("1\n");
    return true;
  }
  return false;
}
bool dfs(int i) {
  if (i == k + 1) return check();
  if (i > 0) {
    mat.a[i][k] = 1;
    if (dfs(i + 1)) return true;
  }
  mat.a[i][k] = 0;
  return dfs(i + 1);
}
int main() {
  scanf("%d", &k);
  int i;
  for (i = X = 1; i <= k; i++) X *= 2;
  X--;
  chklist[0] = X;
  find_prime();
  for (i = 1; i <= P; i++)
    if (X % prime[i] == 0) chklist[++tail] = X / prime[i];
  chklist[++tail] = 1;
  for (i = 1; i <= P; i++)
    if (X % prime[i] == 0) chklist[tail] *= prime[i];
  if (chklist[tail] == chklist[0]) tail--;
  for (i = 1; i < k; i++) mat.a[i + 1][i] = 1;
  if (!dfs(1)) printf("-1");
}
