#include <bits/stdc++.h>
using namespace std;
using gf2poly = bitset<192>;
int main() {
  int n;
  scanf("%d", &n);
  gf2poly pa = 1, pb = 2, pc;
  for (int i = 2; i <= n; i++) {
    pc = (pb << 1) ^ pa;
    pa = pb;
    pb = pc;
  }
  printf("%d\n%d", n, (int)pb[0]);
  for (int i = 1; i <= n; i++) printf(" %d", (int)pb[i]);
  putchar('\n');
  printf("%d\n%d", n - 1, (int)pa[0]);
  for (int i = 1; i <= n - 1; i++) printf(" %d", (int)pa[i]);
  putchar('\n');
}
