#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int bitcnt(long long x) {
  int res = 0;
  for (; x; x &= x - 1) res++;
  return res;
}
void mulModMatr(int n, bool a[51][51], bool b[51][51], bool c[51][51]) {
  static bool cc[51][51];
  memset(cc, 0, sizeof cc);
  ;
  for (int i = 0, _n = (n); i < _n; i++)
    for (int j = 0, _n = (n); j < _n; j++)
      for (int k = 0, _n = (n); k < _n; k++)
        if (a[i][k] && b[k][j]) cc[i][j] ^= 1;
  for (int i = 0, _n = (n); i < _n; i++)
    for (int j = 0, _n = (n); j < _n; j++) c[i][j] = cc[i][j];
}
void powModMatr(int n, long long k, bool aa[51][51], bool cc[51][51]) {
  static bool a[51][51], c[51][51];
  for (int i = 0, _n = (n); i < _n; i++)
    for (int j = 0, _n = (n); j < _n; j++) a[i][j] = aa[i][j];
  for (int i = 0, _n = (n); i < _n; i++)
    for (int j = 0, _n = (n); j < _n; j++) c[i][j] = (i == j);
  for (; k; k /= 2, mulModMatr(n, a, a, a))
    if (k & 1) mulModMatr(n, a, c, c);
  for (int i = 0, _n = (n); i < _n; i++)
    for (int j = 0, _n = (n); j < _n; j++) cc[i][j] = c[i][j];
}
bool test(int n, long long c) {
  int cc = 0;
  for (int i = 0, _n = (n); i < _n; i++) {
    cc <<= 1;
    cc ^= c & 1;
    c >>= 1;
  }
  c = cc;
  long long a = 1;
  for (int i = 0, _n = ((1 << n) - 1); i < _n; i++) {
    if (i > 0 && a == 1) return false;
    a = ((a >> 1) ^ ((bitcnt(a & c) % 2 == 1) << (n - 1)));
    if (!a) return false;
  }
  return a == 1;
}
vector<int> divs;
bool test2(int n, long long c) {
  bool a[51][51], r[51][51];
  memset(a, 0, sizeof a);
  ;
  for (int i = 0, _n = (n - 1); i < _n; i++) a[i + 1][i] = true;
  for (int i = 0, _n = (n); i < _n; i++) a[0][i] = (c & (1LL << i)) != 0;
  powModMatr(n, (1LL << n) - 1, a, r);
  for (int i = 0, _n = (n); i < _n; i++)
    for (int j = 0, _n = (n); j < _n; j++)
      if (r[i][j] != (i == j)) return false;
  for (int ii = 0, _n = ((int)(divs).size()); ii < _n; ii++) {
    powModMatr(n, ((1LL << n) - 1) / divs[ii], a, r);
    for (int i = 0, _n = (n); i < _n; i++)
      for (int j = 0, _n = (n); j < _n; j++)
        if (r[i][j] != (i == j)) goto ok;
    return false;
  ok:;
  }
  return true;
}
vector<long long> answers;
void go(int n) {
  divs.clear();
  cout << "=== " << n << endl;
  int cnt = 0;
  long long pw = (1LL << n) - 1;
  for (int i = 0, _n = (1000000); i < _n; i++)
    if (i > 1)
      if (pw % i == 0) {
        while (pw % i == 0) pw /= i;
        divs.push_back(i);
      }
  if (pw > 1 && pw > 100000000000LL) cout << "? " << pw << endl;
  for (int step = 0, _n = (1000000); step < _n; step++) {
    long long mask = 0;
    for (int i = 0, _n = (n); i < _n; i++) mask = mask * 2 + rand() % 2;
    if (test2(n, mask)) {
      if (n < 20 && !test(n, mask)) cout << "!!!!!!!!!!!!! FUCK" << endl;
      for (int i = 0, _n = (n); i < _n; i++) cout << ((mask & (1LL << i)) != 0);
      cout << "   " << mask << endl;
      answers.push_back(mask);
      return;
      cnt++;
    }
  }
  cout << "NOT FOUND";
}
const long long results[51] = {0,
                               0,
                               3,
                               6,
                               12,
                               30,
                               33,
                               72,
                               150,
                               380,
                               873,
                               2022,
                               3269,
                               4477,
                               10966,
                               17216,
                               63390,
                               67997,
                               228136,
                               345652,
                               831921,
                               1959090,
                               4110207,
                               4230998,
                               14267079,
                               19953845,
                               46262416,
                               115323795,
                               233201634,
                               510773499,
                               692680299,
                               1089257766,
                               2684454780,
                               8352759422,
                               16548130824,
                               20563101117,
                               60389846922,
                               81128304847,
                               213467595574,
                               456552423589,
                               602447979113,
                               1750365006256,
                               3563089605818,
                               7186372434437,
                               13048716715978,
                               20964269033527,
                               69444645767825,
                               133536698030797,
                               194500634974621,
                               420646283225931,
                               764309343199660};
int main() {
  int n;
  cin >> n;
  for (int i = 0, _n = (n); i < _n; i++)
    printf(" %d" + (i == 0), (results[n] & (1LL << i)) != 0 ? 1 : 0);
  printf("\n");
  for (int i = 0, _n = (n); i < _n; i++) printf(" 1" + (i == 0));
  printf("\n");
  return 0;
}
