#include <bits/stdc++.h>
using namespace std;
inline int powmod(int a, int b) {
  int tmp = 1;
  for (; b; b >>= 1) {
    if (b & 1) tmp = (long long)tmp * a % 1000000007;
    a = (long long)a * a % 1000000007;
  }
  return tmp;
}
template <class T>
inline void R(T &xx) {
  xx = 0;
  char ch = getchar();
  bool F = 0;
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') F = 1, ch = getchar();
  while (ch >= '0' && ch <= '9')
    xx = xx + xx + (xx << 3) + ch - 48, ch = getchar();
  if (F) xx = -xx;
}
const int ans[] = {
    0,  0,   3,   3,   3,   15,  27,  15, 29,  27,  27, 23,  83,   27, 43,
    23, 45,  15,  39,  39,  83,  39,  57, 43,  27,  15, 71,  39,   83, 23,
    83, 15,  197, 83,  281, 387, 387, 83, 99,  147, 57, 15,  153,  89, 101,
    27, 449, 51,  657, 113, 29,  75,  75, 71,  329, 71, 149, 45,   99, 149,
    53, 39,  105, 51,  27,  27,  833, 39, 163, 101, 43, 43,  1545, 29};
int n, a[66];
int main() {
  R(n);
  int t = ans[n];
  for (int i = 0; i < (int)(n); i++) a[i] = t & 1, t >>= 1;
  for (int i = 0; i < (int)(n); i++) printf("%d ", a[n - 1 - i]);
  puts("");
  for (int i = (1); i <= (n); i++) printf("1 ");
  return 0;
}
