#include <bits/stdc++.h>
using namespace std;
const int N = 60;
using ll = long long;
inline ll count(ll x) {
  for (int i = 32; i; i >>= 1) x ^= x >> i;
  return x & 1;
}
int n;
struct Arr {
  ll a[N];
  Arr operator+(const Arr &b) const {
    Arr c;
    for (int i = 0; i < n; i++) {
      c.a[i] = 0;
      for (int j = 0; j < n; j++)
        if (b.a[i] >> j & 1) c.a[i] ^= a[j];
    }
    return c;
  }
} I;
bool calc(ll x, ll k) {
  Arr T, Ans = I;
  for (int i = 1; i < n; i++) T.a[i - 1] = 1ll << i;
  T.a[n - 1] = x;
  for (; k; k >>= 1, T = T + T)
    if (k & 1) Ans = Ans + T;
  for (int i = 0; i < n; i++)
    if (Ans.a[i] != I.a[i]) return 0;
  return 1;
}
ll p[N], a[N], tot;
void factorize(ll n) {
  for (ll i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      p[++tot] = i;
      while (n % i == 0) a[tot]++, n /= i;
    }
  }
  if (n > 1) {
    p[++tot] = n, a[tot] = 1;
  }
}
ll d[1000000];
int top;
bool test(ll x) {
  ll k = (1ll << n) - 1;
  if (!calc(x, k)) return 0;
  for (int i = top - 1; i >= 1; i--)
    if (calc(x, d[i])) return 0;
  return 1;
}
int main() {
  scanf("%d", &n);
  factorize((1ll << n) - 1);
  d[++top] = 1;
  for (int i = 1; i <= tot; i++) {
    int cur = top;
    for (int j = 1; j <= cur; j++) {
      ll prod = 1;
      for (int k = 1; k <= a[i]; k++) d[++top] = d[j] * (prod *= p[i]);
    }
  }
  for (int i = 0; i < n; i++) I.a[i] = 1ll << i;
  for (int i = 1; i <= (1ll << n); i += 2)
    if (test(i)) {
      for (int j = n - 1; j >= 0; j--) printf("%lld ", (ll)i >> j & 1);
      puts("");
      for (int j = 0; j < n; j++) printf("1 ");
      puts("");
      return 0;
    }
  puts("-1");
  return 0;
}
