#include <bits/stdc++.h>
using namespace std;
int a[201];
int b[201];
int main() {
  int n;
  scanf("%d", &n);
  a[0] = 0;
  a[1] = 1;
  b[0] = 1;
  for (int ni = 2; ni <= n; ni++) {
    if (ni & 1) {
      for (int nj = 0; nj < ni; nj++) a[nj + 1] ^= b[nj];
    } else {
      for (int nj = 0; nj < ni; nj++) b[nj + 1] ^= a[nj];
    }
  }
  if (n & 1)
    ;
  else
    swap(a, b);
  printf("%d\n", n);
  for (int ni = 0; ni <= n; ni++) {
    printf("%d", a[ni]);
    if (ni != n)
      printf(" ");
    else
      puts("");
  }
  printf("%d\n", n - 1);
  for (int ni = 0; ni <= n - 1; ni++) {
    printf("%d", b[ni]);
    if (ni != n - 1)
      printf(" ");
    else
      puts("");
  }
}
