#include <bits/stdc++.h>
using namespace std;
long long a[] = {0,
                 1,
                 3,
                 5,
                 9,
                 27,
                 51,
                 111,
                 169,
                 383,
                 1011,
                 1779,
                 3857,
                 5643,
                 8923,
                 24753,
                 33067,
                 116055,
                 212769,
                 262443,
                 725255,
                 1075761,
                 2524209,
                 7976435,
                 15707431,
                 18409629,
                 33861393,
                 117032197,
                 138936619LL,
                 274298287LL,
                 960439353LL,
                 1672432273LL,
                 3687034303LL,
                 8277837143LL,
                 12681940927LL,
                 24275210209LL,
                 61667655289LL,
                 93469637841LL,
                 249192203321LL,
                 459419381217LL,
                 927693429845LL,
                 1925924214857LL,
                 3198042696795LL,
                 6705425063805LL,
                 15672607122543LL,
                 30505888021729LL,
                 48793214895031LL,
                 104036523157701LL,
                 185190286308981LL,
                 335046171977639LL,
                 820578756272291LL};
int main() {
  int n;
  scanf("%d", &n);
  long long t = 1LL << n - 1;
  for (int i = 1; i <= n; i++) {
    printf("%d ", (a[n] & t) > 0);
    t >>= 1;
  }
  printf("\n");
  for (int i = 1; i <= n; i++) printf("1 ");
  printf("\n");
  return 0;
}
