#include <bits/stdc++.h>
using namespace std;
int n;
int a[160], b[160], c[160];
int da, db, dc;
int main() {
  scanf("%d", &n);
  a[0] = 0;
  a[1] = 1;
  b[0] = 1;
  da = 1;
  db = 0;
  for (int i = 2; i <= n; i++) {
    for (int i = 0; i <= da; i++) c[i] = a[i];
    for (int i = da; i >= 0; i--) a[i + 1] = a[i];
    a[0] = 0;
    da++;
    for (int i = 0; i <= db; i++) a[i] += b[i];
    for (int i = 0; i <= da; i++) b[i] = c[i];
    db = da - 1;
  }
  printf("%d\n", da);
  for (int i = 0; i <= da; i++) printf("%d ", a[i] % 2);
  printf("\n");
  printf("%d\n", db);
  for (int i = 0; i <= db; i++) printf("%d ", b[i] % 2);
  printf("\n");
  return 0;
}
